summaryrefslogtreecommitdiff
path: root/cipher.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-02-19 21:37:22 +0000
committerChristian Pointner <equinox@anytun.org>2008-02-19 21:37:22 +0000
commitcf18c2f73465f82a43a61c58d6bac8505f7cf07a (patch)
tree0ddf73b1cc95ddc12b250a88c2cbfa102564788a /cipher.cpp
parentreplaces cypher with cipher (diff)
further cleanups
Diffstat (limited to 'cipher.cpp')
-rw-r--r--cipher.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/cipher.cpp b/cipher.cpp
index d68204c..2441080 100644
--- a/cipher.cpp
+++ b/cipher.cpp
@@ -38,6 +38,7 @@
#include "mpi.h"
#include "log.h"
+
void Cipher::encrypt(const PlainPacket & in,EncryptedPacket & out, seq_nr_t seq_nr, sender_id_t sender_id)
{
cipher(out.payload_, in.complete_payload_ , in.complete_payload_length_, seq_nr, sender_id);
@@ -53,8 +54,7 @@ void Cipher::decrypt(const EncryptedPacket & in,PlainPacket & out)
}
-
-//****** NullCipher ******
+//******* NullCipher *******
void NullCipher::cipher(u_int8_t * out, u_int8_t * in, u_int32_t length, seq_nr_t seq_nr, sender_id_t sender_id)
{
@@ -62,15 +62,12 @@ void NullCipher::cipher(u_int8_t * out, u_int8_t * in, u_int32_t length, seq_nr_
}
-
//****** AesIcmCipher ******
AesIcmCipher::AesIcmCipher() : salt_(Buffer(14)) // Q@NINE 14??????
{
- gcry_error_t err;
-
// TODO: hardcoded keysize!!!!!
- err = gcry_cipher_open( &cipher_, GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CTR, 0 );
+ gcry_error_t err = gcry_cipher_open( &cipher_, GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CTR, 0 );
if( err )
cLog.msg(Log::PRIO_CRIT) << "AesIcmCipher::AesIcmCipher: Failed to open cipher";
}