public override void GenerateKey() { KeyValue = RNGCng.GenerateKey(KeySizeValue / 8); }
/// <summary> /// Constructs a HMACSHA512Cng object with a randomly generated key, which will use the Microsoft /// PrimitiveAlgorithm Provider to do its work. /// </summary> public HMACSHA512Cng() : this(RNGCng.GenerateKey(BlockSize)) { }
public override void GenerateIV() { IVValue = RNGCng.GenerateKey(BlockSizeValue / 8); }
public override void GenerateIV() { // Both GCM and CCM work well with 12 byte nonces, so use that by default. IVValue = RNGCng.GenerateKey(12); }