From 360769bc65057ac44013f93a25ff9a06d971acae Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sat, 27 May 2017 07:43:02 -0400 Subject: 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). --- src/tests/test_pbkdf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tests/test_pbkdf.cpp') 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 salt = get_req_bin(vars, "Salt"); const std::string passphrase = get_req_str(vars, "Passphrase"); const std::vector 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 pbkdf(Botan::PBKDF::create(pbkdf_name)); -- cgit v1.2.3