diff options
author | lloyd <[email protected]> | 2009-11-03 23:41:56 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-11-03 23:41:56 +0000 |
commit | 30f6169ebf9164a6fdb35519030975440a5b07d7 (patch) | |
tree | 8435e826dd692066c6c3fc56d02f8f4479188c02 /src/cryptobox | |
parent | cb0d4a18f2fc77a40f6055fedb43b78606068b7b (diff) | |
parent | 226d96ee4e64994beb9ec9436a29ac6656d61924 (diff) |
propagate from branch 'net.randombit.botan.1_8' (head 6e8c18515725a70923b34118951252723dd4c29a)
to branch 'net.randombit.botan' (head 77ba4ea5a4be36d6d029bcc852b2271edff0d679)
Diffstat (limited to 'src/cryptobox')
-rw-r--r-- | src/cryptobox/cryptobox.cpp | 7 | ||||
-rw-r--r-- | src/cryptobox/info.txt | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/cryptobox/cryptobox.cpp b/src/cryptobox/cryptobox.cpp index c27bbaffa..ba7553c55 100644 --- a/src/cryptobox/cryptobox.cpp +++ b/src/cryptobox/cryptobox.cpp @@ -8,9 +8,8 @@ #include <botan/cryptobox.h> #include <botan/filters.h> #include <botan/pipe.h> -#include <botan/serpent.h> +#include <botan/lookup.h> #include <botan/sha2_64.h> -#include <botan/ctr.h> #include <botan/hmac.h> #include <botan/pbkdf2.h> #include <botan/pem.h> @@ -59,7 +58,7 @@ std::string encrypt(const byte input[], u32bit input_len, InitializationVector iv(mk.begin() + CIPHER_KEY_LEN + MAC_KEY_LEN, CIPHER_IV_LEN); - Pipe pipe(new CTR_BE(new Serpent, cipher_key, iv), + Pipe pipe(get_cipher("Serpent/CTR-BE", cipher_key, iv, ENCRYPTION), new Fork( 0, new MAC_Filter(new HMAC(new SHA_512), @@ -121,7 +120,7 @@ std::string decrypt(const byte input[], u32bit input_len, CIPHER_IV_LEN); Pipe pipe(new Fork( - new CTR_BE(new Serpent, cipher_key, iv), + get_cipher("Serpent/CTR-BE", cipher_key, iv, ENCRYPTION), new MAC_Filter(new HMAC(new SHA_512), mac_key, MAC_OUTPUT_LEN))); diff --git a/src/cryptobox/info.txt b/src/cryptobox/info.txt index b9b98060f..0780f55aa 100644 --- a/src/cryptobox/info.txt +++ b/src/cryptobox/info.txt @@ -1,5 +1,3 @@ -realname "Crypto Box" - load_on auto define CRYPTO_BOX |