public AsymmetricCryptographyApplicationService(IAsymmetricCryptographyService cryptographyInfrastructureService
                                                 , IAsymmetricKeyRepositoryFactory asymmetricKeyRepositoryFactory)
 {
     if (cryptographyInfrastructureService == null)
     {
         throw new ArgumentNullException("IAsymmetricCryptographyService");
     }
     if (asymmetricKeyRepositoryFactory == null)
     {
         throw new ArgumentNullException("IAsymmetricKeyRepositoryFactory");
     }
     _cryptographyInfrastructureService = cryptographyInfrastructureService;
     _asymmetricKeyRepositoryFactory    = asymmetricKeyRepositoryFactory;
 }
Exemple #2
0
 public SecretMessageProcessingService(IAsymmetricKeyRepositoryFactory asymmetricKeyRepositoryFactory
                                       , IAsymmetricCryptographyService asymmetricCryptoService, ISymmetricEncryptionService symmetricCryptoService)
 {
     if (asymmetricKeyRepositoryFactory == null)
     {
         throw new ArgumentNullException("Asymmetric key repository factory.");
     }
     if (asymmetricCryptoService == null)
     {
         throw new ArgumentNullException("Asymmetric crypto service.");
     }
     if (symmetricCryptoService == null)
     {
         throw new ArgumentException("Symmetric crypto service.");
     }
     _asymmetricKeyRepositoryFactory = asymmetricKeyRepositoryFactory;
     _asymmetricCryptoService        = asymmetricCryptoService;
     _symmetricCryptoService         = symmetricCryptoService;
 }