예제 #1
0
        public static CsPrng CreateCsprng(StreamCipherCsprngConfiguration config)
        {
            var streamCipherEnum            = config.CipherName.ToEnum <StreamCipher>();
            StreamCipherEngine streamCipher = CipherFactory.CreateStreamCipher(streamCipherEnum);
            var csprng = new StreamCsPrng(streamCipher, config.Key, config.Nonce);

            return(csprng);
        }
예제 #2
0
 public static StreamCipherCsprngConfiguration CreateStreamCipherCsprngConfiguration
     (CsPseudorandomNumberGenerator cipherEnum)
 {
     return(StreamCsPrng.CreateRandomConfiguration(cipherEnum));
 }