public RijndaelStringEncrypter(IEncryptSettingsProvider settings, string key)
 {
     _encryptionProvider = new RijndaelManaged();
     var keyBytes = Encoding.UTF8.GetBytes(key);
     var derivedbytes = new Rfc2898DeriveBytes(settings.EncryptionKey, keyBytes, 3);
     _key = derivedbytes.GetBytes(_encryptionProvider.KeySize / 8);
     _iv = derivedbytes.GetBytes(_encryptionProvider.BlockSize / 8);
 }
Exemple #2
0
        /// <summary>
        /// </summary>
        /// <param name="settings"></param>
        /// <param name="key"></param>
        public RijndaelStringEncrypter(IEncryptSettingsProvider settings, string key)
        {
            _encryptionProvider = new RijndaelManaged();
            var keyBytes     = Encoding.UTF8.GetBytes(key);
            var derivedbytes = new Rfc2898DeriveBytes(settings.EncryptionKey, keyBytes, 3);

            _key = derivedbytes.GetBytes(_encryptionProvider.KeySize / 8);
            _iv  = derivedbytes.GetBytes(_encryptionProvider.BlockSize / 8);
        }
 public StructureMapControllerFactory()
 {
     _settings = new EncryptSettingsProvider();
 }
 public StructureMapControllerFactory()
 {
     _settings = new EncryptSettingsProvider();
 }
Exemple #5
0
 public DecryptingControllerFactory()
 {
     _settings = new EncryptSettingsProvider();
 }
 /// <summary>
 /// 
 /// </summary>
 public DecryptingControllerFactory()
 {
     _settings = new EncryptSettingsProvider();
 }