aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/misc/pbes2
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-02-16 20:12:38 +0000
committerlloyd <[email protected]>2015-02-16 20:12:38 +0000
commit3b9a0c1535e40f8f9fc4cfbc734144ee229df65d (patch)
tree30c1d4363b4c85561204d26344f40de3e78f6d9d /src/lib/misc/pbes2
parent85caef829c9eeb7c224ad3b2e3ffbcfe981c2428 (diff)
Add new module `ffi` which provides a plain C interface, plus a new
ctypes Python wrapper that uses it. The API is intentionally designed to have a very simple ABI (extern "C", all structs are opaque, no memory ownership passing the FFI boundary, limited set of simple types as args) so the ctypes wrapper is quite simple. Currently ffi provides ciphers, hashes, MACs, RNGs, PBKDF, KDF, bcrypt, and most public key operations. Remove the old boost.python wrapper and all the build code for it.
Diffstat (limited to 'src/lib/misc/pbes2')
-rw-r--r--src/lib/misc/pbes2/pbes2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/misc/pbes2/pbes2.cpp b/src/lib/misc/pbes2/pbes2.cpp
index 17f14170d..e46286906 100644
--- a/src/lib/misc/pbes2/pbes2.cpp
+++ b/src/lib/misc/pbes2/pbes2.cpp
@@ -80,7 +80,7 @@ pbes2_encrypt(const secure_vector<byte>& key_bits,
if(cipher_spec[1] != "CBC" && cipher_spec[1] != "GCM")
throw Decoding_Error("PBE-PKCS5 v2.0: Don't know param format for " + cipher);
- std::unique_ptr<Keyed_Transform> enc(get_cipher_mode(cipher, ENCRYPTION));
+ std::unique_ptr<Cipher_Mode> enc(get_cipher_mode(cipher, ENCRYPTION));
PKCS5_PBKDF2 pbkdf(Algo_Registry<MessageAuthenticationCode>::global_registry().make(prf));
@@ -153,7 +153,7 @@ pbes2_decrypt(const secure_vector<byte>& key_bits,
const std::string prf = OIDS::lookup(prf_algo.oid);
PKCS5_PBKDF2 pbkdf(Algo_Registry<MessageAuthenticationCode>::global_registry().make(prf));
- std::unique_ptr<Keyed_Transform> dec(get_cipher_mode(cipher, DECRYPTION));
+ std::unique_ptr<Cipher_Mode> dec(get_cipher_mode(cipher, DECRYPTION));
if(key_length == 0)
key_length = dec->key_spec().maximum_keylength();