20 lines
691 B
C#
20 lines
691 B
C#
public class SqlHashers
|
|
{
|
|
[Microsoft.SqlServer.Server.SqlProcedure]
|
|
public static void Argon2id_hash(string password, out string output)
|
|
{
|
|
output = Hashers.Argon2id_hash(password);
|
|
}
|
|
|
|
[Microsoft.SqlServer.Server.SqlProcedure]
|
|
public static void Argon2id_hash_custom(string password, short parallel, short memory, short iterations, short bc, out string output)
|
|
{
|
|
output = Hashers.Argon2id_hash_custom(password, parallel, memory, iterations, bc);
|
|
}
|
|
|
|
[Microsoft.SqlServer.Server.SqlProcedure]
|
|
public static int Argon2id_verify(string password, string hash)
|
|
{
|
|
return Hashers.Argon2id_verify(password, hash) ? 1 : 0;
|
|
}
|
|
}
|