public AsymmetricInMemoryCryptoService(AsymmetricCryptoServiceOptions options) : base(options) { if (Options.AssignNewKey) { AssignNewKey(); } }
public AsymmetricXmlCryptoService(AsymmetricCryptoServiceOptions options) : base(options) { if (string.IsNullOrEmpty(Options.XmlPublicKeyFilePath)) { throw new ArgumentException($"{nameof(Options.XmlPublicKeyFilePath)} cannot be null or empty"); } if (string.IsNullOrEmpty(Options.XmlPrivateKeyFilePath)) { throw new ArgumentException($"{nameof(Options.XmlPrivateKeyFilePath)} cannot be null or empty"); } if (Options.AssignNewKey) { AssignNewKey(); } }
public AsymmetricCspCryptoService(AsymmetricCryptoServiceOptions options) : base(options) { if (options.CspParameters == null) { throw new ArgumentException($"{nameof(options.CspParameters)} cannot be null or empty"); } if (string.IsNullOrEmpty(options.CspParameters.KeyContainerName)) { throw new ArgumentException($"{nameof(options.CspParameters.KeyContainerName)} cannot be null or empty"); } if (Options.AssignNewKey) { AssignNewKey(); } }
protected AsymmetricCryptoServiceBase(AsymmetricCryptoServiceOptions options) { Options = options; }
public static AsymmetricCryptoServiceBuilder WithOptions(this AsymmetricCryptoServiceBuilder builder, AsymmetricCryptoServiceOptions options) { builder.Options = options; return(builder); }