feat: add generator base32 for totp

This commit is contained in:
Polianin Nikita 2024-12-18 07:14:04 +03:00
parent 5437623a20
commit 182235c4cd

View File

@ -25,6 +25,10 @@ public static class GeneratorKey
.ToArray()); .ToArray());
} }
public static string GenerateAlphaNumericBase32Compatible(int size, string? excludes = null,
string? includes = null) =>
GenerateAlphaNumeric(size, excludes + "0189", includes);
public static ReadOnlySpan<byte> GenerateBytes(int size) public static ReadOnlySpan<byte> GenerateBytes(int size)
{ {
var key = new byte[size]; var key = new byte[size];