Fork of François Berder Crypto, fixed AES CBC and small rework
Dependents: AES_example shaun_larada Smartage
Fork of Crypto by
Diff: cipher/DES.h
- Revision:
- 8:a090264e9b2d
- Parent:
- 7:2dbbdfb08123
--- a/cipher/DES.h Sat Sep 14 18:21:32 2013 +0000 +++ b/cipher/DES.h Sat Sep 14 20:54:59 2013 +0000 @@ -1,23 +1,23 @@ #ifndef DES_H #define DES_H -#include "Cipher.h" +#include "BlockCipher.h" +class TDES; -class DES : public Cipher +class DES : public BlockCipher { + friend class TDES; + public : DES(uint8_t* key); - - virtual void encrypt(uint8_t *out, uint8_t *in, uint32_t length); - virtual void decrypt(uint8_t *out, uint8_t *in, uint32_t length); - virtual uint32_t getBlockSize() const; - - CIPHER_TYPE getType() const; - + DES(uint8_t *key, uint8_t *iv); + private : + virtual void encryptBlock(uint8_t *out, uint8_t *in); + virtual void decryptBlock(uint8_t *out, uint8_t *in); void generateSubKeys(uint8_t *key); uint8_t subKeys[16][7];