8 #include <botan/get_pbe.h>
9 #include <botan/oids.h>
10 #include <botan/scan_name.h>
11 #include <botan/parsing.h>
12 #include <botan/libstate.h>
14 #if defined(BOTAN_HAS_PBE_PKCS_V15)
15 #include <botan/pbes1.h>
18 #if defined(BOTAN_HAS_PBE_PKCS_V20)
19 #include <botan/pbes2.h>
20 #include <botan/hmac.h>
30 std::chrono::milliseconds msec,
35 const std::string pbe = request.
algo_name();
36 std::string digest_name = request.
arg(0);
37 const std::string cipher = request.
arg(1);
39 std::vector<std::string> cipher_spec =
split_on(cipher,
'/');
40 if(cipher_spec.size() != 2)
44 const std::string cipher_mode = cipher_spec[1];
46 if(cipher_mode !=
"CBC")
62 #if defined(BOTAN_HAS_PBE_PKCS_V15)
63 if(pbe ==
"PBE-PKCS5v15")
65 hash_function->
clone(),
71 #if defined(BOTAN_HAS_PBE_PKCS_V20)
72 if(pbe ==
"PBE-PKCS5v20")
87 const std::vector<byte>& params,
92 const std::string pbe = request.
algo_name();
94 #if defined(BOTAN_HAS_PBE_PKCS_V15)
95 if(pbe ==
"PBE-PKCS5v15")
100 std::string digest_name = request.
arg(0);
101 const std::string cipher = request.
arg(1);
103 std::vector<std::string> cipher_spec =
split_on(cipher,
'/');
104 if(cipher_spec.size() != 2)
108 const std::string cipher_mode = cipher_spec[1];
110 if(cipher_mode !=
"CBC")
126 hash_function->
clone(),
132 #if defined(BOTAN_HAS_PBE_PKCS_V20)
133 if(pbe ==
"PBE-PKCS5v20")