refactor(Extension): move to Application.Extensions and remove the project.

- update references
This commit is contained in:
Developer 02
2025-08-28 18:46:55 +02:00
parent a343312f97
commit 0b879b2f5b
23 changed files with 19 additions and 55 deletions

View File

@@ -0,0 +1,14 @@
using OtpNet;
namespace EnvelopeGenerator.Application.Extensions
{
public static class StringExtension
{
public static bool IsValidTotp(this string totp, string secret)
{
var secret_bytes = Base32Encoding.ToBytes(secret);
var secret_totp = new Totp(secret_bytes);
return secret_totp.VerifyTotp(totp, out _, VerificationWindow.RfcSpecifiedNetworkDelay);
}
}
}