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); }
public static StreamCipherCsprngConfiguration CreateStreamCipherCsprngConfiguration (CsPseudorandomNumberGenerator cipherEnum) { return(StreamCsPrng.CreateRandomConfiguration(cipherEnum)); }