diff options
author | Jack Lloyd <[email protected]> | 2017-05-27 07:43:02 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-05-27 07:43:02 -0400 |
commit | 360769bc65057ac44013f93a25ff9a06d971acae (patch) | |
tree | 691dfd44c0462093280a8df45081b0b990eb3803 /src/tests/test_pbkdf.cpp | |
parent | a293c21ba83fb9c4d59237f8fa0fd5d852c27992 (diff) |
Add (back) OpenPGP-S2K
It was removed somewhere along the line in 1.11, with the logic
that it is a funky PGP-specific scheme and (quoting the commit
that removed it) "not really useful outside of a full PGP implementation".
This assumed that the PGP implementation would be in Botan itself, but
PGP is implemented in https://github.com/evpo/EncryptPad/ (which is
a PGP implementation using 1.10), and RNP (https://github.com/riboseinc/rnp)
would like to use it also.
This work was sponsored by Ribose Inc (@riboseinc).
Diffstat (limited to 'src/tests/test_pbkdf.cpp')
-rw-r--r-- | src/tests/test_pbkdf.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/test_pbkdf.cpp b/src/tests/test_pbkdf.cpp index bd2fd8f89..32144bd9b 100644 --- a/src/tests/test_pbkdf.cpp +++ b/src/tests/test_pbkdf.cpp @@ -18,15 +18,15 @@ namespace { class PBKDF_KAT_Tests : public Text_Based_Test { public: - PBKDF_KAT_Tests() : Text_Based_Test("pbkdf", "OutputLen,Iterations,Salt,Passphrase,Output") {} + PBKDF_KAT_Tests() : Text_Based_Test("pbkdf", "Iterations,Salt,Passphrase,Output", "OutputLen") {} Test::Result run_one_test(const std::string& pbkdf_name, const VarMap& vars) override { - const size_t outlen = get_req_sz(vars, "OutputLen"); const size_t iterations = get_req_sz(vars, "Iterations"); const std::vector<uint8_t> salt = get_req_bin(vars, "Salt"); const std::string passphrase = get_req_str(vars, "Passphrase"); const std::vector<uint8_t> expected = get_req_bin(vars, "Output"); + const size_t outlen = get_opt_sz(vars, "OutputLen", expected.size()); Test::Result result(pbkdf_name); std::unique_ptr<Botan::PBKDF> pbkdf(Botan::PBKDF::create(pbkdf_name)); |