Exemplo n.º 1
0
        public IEncryption EncryptionForIntent(EncryptionIntent intent)
        {
            var key = _encryptionKeyReadProvider.GetKeyForIntent(intent);
            var e   = new BasicEncryption(key.Algorithm)
            {
                Key = key
            };

            return(e);
        }
Exemplo n.º 2
0
        public IEncryptionKey GetKeyForIntent(EncryptionIntent intent)
        {
            var key = new EncryptionKey
            {
                Key       = Convert.FromBase64String(_configuration.GetValue <string>("Encryption:" + intent + ":Key")),
                IV        = Convert.FromBase64String(_configuration.GetValue <string>("Encryption:" + intent + ":IV")),
                Algorithm = _configuration.GetValueOrDefault("Encryption:" + intent + ":Algorithm",
                                                             EncryptionAlgorithm.Rijndael)
            };

            return(key);
        }
Exemplo n.º 3
0
 public void WriteKeyForIntent(EncryptionIntent intent, IEncryptionKey key)
 {
     throw new NotImplementedException();
 }