Changeset 1194 for trunk/CrypPlugins/DES


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/DES/DES.cs

    r1193 r1194  
    546546        }
    547547
    548         public byte[] Decrypt(byte[] ciphertext, byte[] key)
    549         {
    550             return Decrypt(ciphertext, key, ciphertext.Length);
     548        public byte[] Decrypt(byte[] ciphertext, byte[] key, byte[] IV)
     549        {
     550            return Decrypt(ciphertext, key, IV, ciphertext.Length);
    551551        }
    552552
    553553        // TODO: add override with iv, mode, blocksize
    554         public byte[] Decrypt(byte[] ciphertext, byte[] key, int bytesToUse)
     554        public byte[] Decrypt(byte[] ciphertext, byte[] key, byte[] IV, int bytesToUse)
    555555        {
    556556            int size = bytesToUse > ciphertext.Length ? ciphertext.Length : bytesToUse;
     
    560560                fixed (byte* inp = ciphertext)
    561561                fixed (byte* akey = key)
    562                 {
    563                     return NativeCryptography.Crypto.decryptDES(inp, akey, size, ((DESSettings)plugin.Settings).Mode);
     562                fixed (byte* iv = IV)
     563                {
     564                    return NativeCryptography.Crypto.decryptDES(inp, akey, iv, size, ((DESSettings)plugin.Settings).Mode);
    564565                }
    565566            }
Note: See TracChangeset for help on using the changeset viewer.