@@ -24,22 +24,22 @@ static std::string openssl_base64_encode(const size_t ndata, const uint8_t* data
2424 return encoded;
2525}
2626
27- static std::vector<uint8_t > openssl_base64_decode (std::string_view data)
28- {
29- BIO* b64 = BIO_new (BIO_f_base64 ());
30- BIO* bio = BIO_new_mem_buf (data.data (), data.size ());
31- BIO_set_flags (b64, BIO_FLAGS_BASE64_NO_NL);
32- bio = BIO_push (b64, bio);
27+ // static std::vector<uint8_t> openssl_base64_decode(std::string_view data)
28+ // {
29+ // BIO* b64 = BIO_new(BIO_f_base64());
30+ // BIO* bio = BIO_new_mem_buf(data.data(), data.size());
31+ // BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
32+ // bio = BIO_push(b64, bio);
3333
34- std::vector<uint8_t > output (data.size (), 0 ); // Base64 expands by 4/3, so input is always >= output
35- int decoded_len = BIO_read (bio, output.data (), output.size ());
36- if (decoded_len < 0 )
37- fprintf (stderr, " Failed to base64 decode data\n " );
34+ // std::vector<uint8_t> output(data.size(), 0); // Base64 expands by 4/3, so input is always >= output
35+ // int decoded_len = BIO_read(bio, output.data(), output.size());
36+ // if (decoded_len < 0)
37+ // fprintf(stderr, "Failed to base64 decode data\n");
3838
39- output.resize (std::max (decoded_len, 0 ));
40- BIO_free_all (bio);
41- return output;
42- }
39+ // output.resize(std::max(decoded_len, 0));
40+ // BIO_free_all(bio);
41+ // return output;
42+ // }
4343
4444TEST_SUITE (" [BASE64]" )
4545{
0 commit comments