diff options
author | vnugent <public@vaughnnugent.com> | 2023-11-03 18:34:13 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-11-03 18:34:13 -0400 |
commit | 218b867ec568f4002d8c18a565fc46e186d1322a (patch) | |
tree | a162dc3bc76e5c179dda641a94e48c6d26450127 /plugins/VNLib.Plugins.Essentials.Accounts | |
parent | 068a7199257338fcf19888f9670d2a6a9627045b (diff) |
a little api polish
Diffstat (limited to 'plugins/VNLib.Plugins.Essentials.Accounts')
-rw-r--r-- | plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs | 2 |
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 f1d14f4..3908613 100644 --- a/plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs +++ b/plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs @@ -134,7 +134,7 @@ namespace VNLib.Plugins.Essentials.Accounts.MFA //Alloc buffer with zero o using UnsafeMemoryHandle<byte> buffer = MemoryUtil.UnsafeAllocNearestPage(base32Secret.Length, true); - ERRNO count = VnEncoding.TryFromBase32Chars(base32Secret, buffer); + ERRNO count = VnEncoding.TryFromBase32Chars(base32Secret, buffer.Span); //Verify the TOTP using the decrypted secret isValid = count && VerifyTOTP(code, buffer.AsSpan(0, count), config.TOTPConfig); //Zero out the buffer |