From 218b867ec568f4002d8c18a565fc46e186d1322a Mon Sep 17 00:00:00 2001 From: vnugent Date: Fri, 3 Nov 2023 18:34:13 -0400 Subject: a little api polish --- plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') 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 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 -- cgit