fix: add preprocessor directives

This commit is contained in:
Stevan Freeborn
2026-04-02 13:50:47 -05:00
parent 33fb8bdf54
commit d6e22f9f24
2 changed files with 15 additions and 1 deletions
@@ -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
}
}