Fork of François Berder Crypto, fixed AES CBC and small rework

Dependents:   AES_example shaun_larada Smartage

Fork of Crypto by Francois Berder

Revision:
15:6093fc19aad6
Parent:
8:a090264e9b2d
--- a/cipher/BlockCipher.h	Sun May 11 13:36:45 2014 +0000
+++ b/cipher/BlockCipher.h	Wed Jan 28 17:15:32 2015 +0000
@@ -6,7 +6,8 @@
 enum BLOCK_CIPHER_MODE
 {
     ECB_MODE,
-    CBC_MODE
+    CBC_MODE,
+    PCBC_MODE
 };
 
 class BlockCipher : public Cipher
@@ -18,6 +19,7 @@
         
         virtual CIPHER_TYPE getType() const;        
         uint32_t getBlockSize() const;
+        void setIV(uint8_t *iv);
 
         virtual void encrypt(uint8_t *out, uint8_t *in, uint32_t length);        
         virtual void decrypt(uint8_t *out, uint8_t *in, uint32_t length);        
@@ -32,6 +34,9 @@
         uint32_t blockSize;
         BLOCK_CIPHER_MODE mode;
         uint8_t *IV;
+        uint8_t *tmpIV;
+        uint8_t *tmpdatain;
+        uint8_t *tmpdata;
 };
 
 #endif