Beispiel #1
0
        public EncryptionService(ISymmetricKeyAlgorithmProvider provider, ICryptographicBuffer cryptographicBuffer, byte[] key)
        {
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

            if (key == null)
            {
                throw new ArgumentNullException(nameof(key));
            }

            _cryptographicBuffer = cryptographicBuffer;

            _key = provider.CreateSymmetricKey(key);
        }
Beispiel #2
0
 public CacheableSettings(EncryptionServiceFactory encryptionServiceFactory, ICryptographicBuffer cryptographicBuffer, IConfiguration configuration)
     : base(encryptionServiceFactory, cryptographicBuffer, configuration)
 {
 }
Beispiel #3
0
 public SecuredSettings(EncryptionServiceFactory encryptionServiceFactory, ICryptographicBuffer cryptographicBuffer, IConfiguration configuration) : base(configuration)
 {
     _cryptographicBuffer = cryptographicBuffer;
     _encryptionService   = encryptionServiceFactory.Create(LoadKey(configuration));
 }
Beispiel #4
0
 public EncryptionServiceFactory(ISymmetricKeyAlgorithmProvider provider, ICryptographicBuffer cryptographicBuffer)
 {
     _provider            = provider;
     _cryptographicBuffer = cryptographicBuffer;
 }