This commit is contained in:
TheXamlGuy
2024-05-24 08:21:50 +01:00
parent 40a150fe80
commit c0c1a82846
103 changed files with 168 additions and 655 deletions
+5 -5
View File
@@ -2,15 +2,15 @@
namespace Toolkit.Foundation;
public class KeyDeriver :
public class KeyDeriver :
IKeyDeriver
{
public byte[] DeriveKey(byte[] phrase,
byte[] salt,
int keySize = 32,
public byte[] DeriveKey(byte[] phrase,
byte[] salt,
int keySize = 32,
int iterations = 100000)
{
using Rfc2898DeriveBytes pbkdf2 = new(phrase, salt, iterations, HashAlgorithmName.SHA256);
return pbkdf2.GetBytes(keySize);
}
}
}