Esempio n. 1
0
 public static ScryptResult ToBase64Scrypt(string data, uint saltSize = ScryptSaltSize, uint iterations = ScryptIterations, uint blockSize = ScryptBlockSize, uint parallelism = ScryptParallelism, uint derivedKeyLength = ScryptDerivedKeyLength)
 {
     byte[] salt = RandomManager.Next((int)saltSize);
     return(ToBase64Scrypt(data, ToBase64(salt), true, iterations, blockSize, parallelism, derivedKeyLength));
 }
Esempio n. 2
0
 public static Argon2Result ToBase64Argon2(string data, uint iterations, uint memorySizeKiB, uint parallelism, uint saltSize = Argon2SaltSize, Argon2Variant variant = Argon2Variant.Argon2id, uint derivedKeyLength = Argon2DerivedKeyLength)
 {
     byte[] salt = RandomManager.Next((int)saltSize);
     return(ToBase64Argon2(data, ToBase64(salt), true, iterations, memorySizeKiB, parallelism, variant, derivedKeyLength));
 }
Esempio n. 3
0
 public static HmacResult ToBase64Hmac(byte[] data, uint keySize = HmacKeySize, HashAlgorithm algorithm = HashAlgorithm.Sha512)
 {
     return(ToBase64Hmac(data, RandomManager.Next((int)keySize), algorithm));
 }