aboutsummaryrefslogtreecommitdiff
path: root/plugins/VNLib.Plugins.Essentials.Accounts/src/MFA
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-03-27 02:20:16 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2023-03-27 02:20:16 -0400
commitd1fd903866b475711be9ac619d99f2768972068f (patch)
tree543bbf1772f40a47554524550fe31cebd19b4bb5 /plugins/VNLib.Plugins.Essentials.Accounts/src/MFA
parent1dc1ac2e53f25528aacd1510da928d5f56e3dad7 (diff)
Native heap api and alloc optimizations
Diffstat (limited to 'plugins/VNLib.Plugins.Essentials.Accounts/src/MFA')
-rw-r--r--plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs b/plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs
index 079c904..63b2a2b 100644
--- a/plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs
+++ b/plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs
@@ -121,7 +121,7 @@ namespace VNLib.Plugins.Essentials.Accounts.MFA
return false;
}
//Alloc buffer with zero o
- using UnsafeMemoryHandle<byte> buffer = MemoryUtil.UnsafeAlloc<byte>(base32Secret.Length, true);
+ using UnsafeMemoryHandle<byte> buffer = MemoryUtil.UnsafeAlloc(base32Secret.Length, true);
ERRNO count = VnEncoding.TryFromBase32Chars(base32Secret, buffer);
//Verify the TOTP using the decrypted secret
return count && VerifyTOTP(code, buffer.AsSpan(0, count), config.TOTPConfig);