public static Key Create() { var prng = new WinCryptoPrng(); var rnd = prng.GetBytes(32); var key = Hashes.SHA256(rnd); return(new Key(key)); }
public static Key Create(string entropy) { var prng = new WinCryptoPrng(); var rnd = prng.GetBytes(32); var data = Encoders.ASCII.GetBytes(entropy); var key = Hashes.HMACSHA256(rnd, data); return(new Key(key)); }
public static Key Create(string entropy) { var prng = new WinCryptoPrng(); var rnd = prng.Next(); var data = Encoders.ASCII.Decode(entropy); var key = Hashes.HMACSHA256(rnd, data); return new Key(key); }
public static Key Create() { var prng = new WinCryptoPrng(); var rnd = prng.Next(); var key = Hashes.SHA256(rnd); return new Key(key); }