//
// Created by MyPC on 2021/4/17.
//


#include <openssl/base64.h>

int Base64Encode(const char *src, int src_length, char *encoded){
    return EVP_EncodeBlock((unsigned char*)encoded, (const unsigned char*)src, src_length);
}

int Base64Decode(const char *encoded, int encoded_length, char *decoded) {
    return EVP_DecodeBlock((unsigned char*)decoded, (const unsigned char*)encoded, encoded_length);
}