return data;
}
+std::map<std::string, yaca_key_type_e> str2keytype = {
+ std::make_pair("SYMMETRIC", YACA_KEY_TYPE_SYMMETRIC),
+ std::make_pair("DES", YACA_KEY_TYPE_DES),
+ std::make_pair("IV", YACA_KEY_TYPE_IV),
+ std::make_pair("RSA_PRIV", YACA_KEY_TYPE_RSA_PRIV),
+ std::make_pair("RSA_PUB", YACA_KEY_TYPE_RSA_PUB),
+ std::make_pair("DSA_PRIV", YACA_KEY_TYPE_DSA_PRIV),
+ std::make_pair("DSA_PUB", YACA_KEY_TYPE_DSA_PUB)
+};
+
std::map<std::string, yaca_digest_algorithm_e> str2digest = {
std::make_pair("MD5", YACA_DIGEST_MD5),
std::make_pair("SHA1", YACA_DIGEST_SHA1),
val = hex2bin(value(key));
}
+void TestVector::get(const std::string &key, yaca_key_type_e &val) const
+{
+ val = str2keytype.at(value(key));
+}
+
void TestVector::get(const std::string &key, yaca_digest_algorithm_e &val) const
{
val = str2digest.at(value(key));
void get(const std::string &key, std::string &val) const;
/* special case for buffer */
void get(const std::string &key, Buffer &val) const;
+ /* special case for key type */
+ void get(const std::string &key, yaca_key_type_e &val) const;
/* special case for message digest */
void get(const std::string &key, yaca_digest_algorithm_e &val) const;
/* special case for encryption algorithm */