Change-Id: Icc5f8e4eb198ee11e76453ed751531bac09bbab8
default: return "Unknown encrypt algorithm";
}
}
+
+const char* padding2str(yaca_padding_e padding)
+{
+ switch (padding) {
+ ENUM_DESCRIBE(YACA_PADDING_NONE);
+ ENUM_DESCRIBE(YACA_PADDING_PKCS1);
+ ENUM_DESCRIBE(YACA_PADDING_PKCS1_PSS);
+ ENUM_DESCRIBE(YACA_PADDING_X931);
+ default: return "Unknown padding type";
+ }
+}
#undef ENUM_DESCRIBE
std::string truncate_str(const std::string &input, size_t len)
const char* encrypt2str(yaca_encrypt_algorithm_e algo);
+const char* padding2str(yaca_padding_e padding);
+
/* If input is longer than len it is truncated and an ellipsis is appended.
* Otherwise the original string is returned. */
std::string truncate_str(const std::string &input, size_t len);