// // Created by dongwenzhe on 2023/3/14. // #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include "doctest.h" #include "crypto.h" TEST_SUITE("Crypto functions") { TEST_CASE("BASE64") { auto *pSrc = (unsigned char *)"HELLOWORLD"; const char *encode; encode = base64_encode(pSrc, 16); INFO("BASE64_ENCODING:", encode); unsigned char *decode; unsigned int outputSize = 0; decode = base64_decode(encode, &outputSize); INFO("BASE64_DECODING:", decode); for(int i = 0; i