Exemple #1
0
 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);
 }
Exemple #2
0
 public static Key Create()
 {
     var prng = new WinCryptoPrng();
     var rnd = prng.Next();
     var key = Hashes.SHA256(rnd);
     return new Key(key);
 }