public CryptoServiceProvider(CryptoServiceProviderOptions options) { if (options == null) { throw new ArgumentNullException("options"); } if (options.InitializationVector == null) { throw new ArgumentNullException("options.InitializationVector"); } if (options.InitializationVector.Length == 0) { throw new ArgumentOutOfRangeException("options.InitializationVector"); } if (options.Key == null) { throw new ArgumentNullException("options.Key"); } if (options.Key.Length == 0) { throw new ArgumentOutOfRangeException("options.Key"); } _options = options; }
public CryptoService(CryptoServiceProviderOptions options) { _cryptoServiceProvider = new CryptoServiceProvider(options); }