Changeset 1194 for trunk/CrypPlugins/AES


Ignore:
Timestamp:
Feb 26, 2010, 1:46:08 AM (12 years ago)
Author:
Sven Rech
Message:

added IV to the IControlEncryption interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/AES/AES.cs

    r1193 r1194  
    497497        }
    498498
    499         public byte[] Decrypt(byte[] ciphertext, byte[] key)
    500         {
    501             return Decrypt(ciphertext, key, ciphertext.Length);
    502         }
    503 
    504         public byte[] Decrypt(byte[] ciphertext, byte[] key, int bytesToUse)
     499        public byte[] Decrypt(byte[] ciphertext, byte[] key, byte[] IV)
     500        {
     501            return Decrypt(ciphertext, key, IV, ciphertext.Length);
     502        }
     503
     504        public byte[] Decrypt(byte[] ciphertext, byte[] key, byte[] IV, int bytesToUse)
    505505        {
    506506            int size = bytesToUse > ciphertext.Length ? ciphertext.Length : bytesToUse;
     
    527527                fixed (byte* inp = ciphertext)
    528528                fixed (byte* akey = key)
     529                fixed (byte* iv = IV)
    529530                {
    530                     return NativeCryptography.Crypto.decryptAES(inp, akey, bits, size, ((AESSettings)plugin.Settings).Mode);
     531                    return NativeCryptography.Crypto.decryptAES(inp, akey, iv, bits, size, ((AESSettings)plugin.Settings).Mode);
    531532                }
    532533            }
Note: See TracChangeset for help on using the changeset viewer.