public static KeyIVPair FromPasswordString(string password, byte[] iv = null) { return (new KeyIVPair( password.ApplySHA256(), iv ?? CryptoRNG.GetRandomBytes(AesSizes.IV) )); }
public void GenerateIV() { IV = CryptoRNG.GetRandomBytes(AesSizes.IV); }
public KeyIVPair() { Key = CryptoRNG.GetRandomBytes(AesSizes.Key); IV = CryptoRNG.GetRandomBytes(AesSizes.IV); }
public MasterPassword() { Password = CryptoRNG.GetRandomBytes(AesSizes.Key); AuthenticationHash = GeneratePasswordHash(Password); _mode = CryptoMode.Encryption; }