diff options
author | Othmar Gsenger <otti@anytun.org> | 2014-09-30 19:47:25 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2014-09-30 19:47:25 +0000 |
commit | 2ca5c8503f46b3c17336faa6b547a30d695aec73 (patch) | |
tree | 36fbfe858d16879fa3d5254c45a3ffafe1e02c88 /src/crypto/openssl.h | |
parent | added openssl crypto class (diff) |
refactored crypto interface. linking fails, needs fixing
Diffstat (limited to 'src/crypto/openssl.h')
-rw-r--r-- | src/crypto/openssl.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/crypto/openssl.h b/src/crypto/openssl.h index ba5a340..b86550e 100644 --- a/src/crypto/openssl.h +++ b/src/crypto/openssl.h @@ -55,11 +55,10 @@ namespace crypto { public: virtual ~Openssl() {}; // pure virtual - virtual bool generatePacketKey( kd_dir_t dir, satp_prf_label_t label, seq_nr_t seq_nr, const Buffer& masterkey , const Buffer& mastersalt, Buffer& key); - virtual void calcMasterKey(std::string passphrase, uint16_t length, Buffer& masterkey ); - virtual void calcMasterSalt(std::string passphrase, uint16_t length, Buffer& mastersalt ); - virtual void encrypt(const Buffer& key, PlainPacket& in, EncryptedPacket& out); - virtual void decrypt(const Buffer& key, EncryptedPacket& in, PlainPacket& out); + virtual void calcMasterKeySalt(std::string passphrase, uint16_t length, Buffer& masterkey , Buffer& mastersalt); + virtual uint32_t cipher(uint8_t* in, uint32_t ilen, uint8_t* out, uint32_t olen, const Buffer& masterkey, const Buffer& mastersalt, role_t role, seq_nr_t seq_nr, sender_id_t sender_id, mux_t mux); + virtual uint32_t decipher(uint8_t* in, uint32_t ilen, uint8_t* out, uint32_t olen, const Buffer& masterkey, const Buffer& mastersalt, role_t role, seq_nr_t seq_nr, sender_id_t sender_id, mux_t mux); + // virtual virtual std::string printType(); //static |