fix: add preprocessor directives
This commit is contained in:
+4
@@ -11,7 +11,11 @@ internal sealed class MachineIdKeyProvider(IMachineIdKeyGenerator generator) : I
|
||||
{
|
||||
var machineId = _generator.GetId();
|
||||
var @bytes = Encoding.UTF8.GetBytes(machineId);
|
||||
#if NET5_0_OR_GREATER
|
||||
return SHA256.HashData(@bytes);
|
||||
#else
|
||||
using var sha256 = SHA256.Create();
|
||||
return sha256.ComputeHash(@bytes);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user