const EVP_CIPHER* get_evp_type(const EncryptionMode mode) {
    switch (mode) {
    case AES_128_ECB:
        return EVP_aes_128_ecb();
    case AES_128_CBC:
        return EVP_aes_128_cbc();
    case AES_128_CFB:
        return EVP_aes_128_cfb();
    case AES_128_CFB1:
        return EVP_aes_128_cfb1();
    case AES_128_CFB8:
        return EVP_aes_128_cfb8();
    case AES_128_CFB128:
        return EVP_aes_128_cfb128();
    case AES_128_CTR:
        return EVP_aes_128_ctr();
    case AES_128_OFB:
        return EVP_aes_128_ofb();
    case AES_192_ECB:
        return EVP_aes_192_ecb();
    case AES_192_CBC:
        return EVP_aes_192_cbc();
    case AES_192_CFB:
        return EVP_aes_192_cfb();
    case AES_192_CFB1:
        return EVP_aes_192_cfb1();
    case AES_192_CFB8:
        return EVP_aes_192_cfb8();
    case AES_192_CFB128:
        return EVP_aes_192_cfb128();
    case AES_192_CTR:
        return EVP_aes_192_ctr();
    case AES_192_OFB:
        return EVP_aes_192_ofb();
    case AES_256_ECB:
        return EVP_aes_256_ecb();
    case AES_256_CBC:
        return EVP_aes_256_cbc();
    case AES_256_CFB:
        return EVP_aes_256_cfb();
    case AES_256_CFB1:
        return EVP_aes_256_cfb1();
    case AES_256_CFB8:
        return EVP_aes_256_cfb8();
    case AES_256_CFB128:
        return EVP_aes_256_cfb128();
    case AES_256_CTR:
        return EVP_aes_256_ctr();
    case AES_256_OFB:
        return EVP_aes_256_ofb();
    case SM4_128_CBC:
        return EVP_sm4_cbc();
    case SM4_128_ECB:
        return EVP_sm4_ecb();
    case SM4_128_CFB128:
        return EVP_sm4_cfb128();
    case SM4_128_OFB:
        return EVP_sm4_ofb();
    case SM4_128_CTR:
        return EVP_sm4_ctr();
    default:
        return nullptr;
    }
}
const EVP_CIPHER* get_evp_type(const EncryptionMode mode) {
    switch (mode) {
    case AES_128_ECB:
        return EVP_aes_128_ecb();
    case AES_128_CBC:
        return EVP_aes_128_cbc();
    case AES_128_CFB:
        return EVP_aes_128_cfb();
    case AES_128_CFB1:
        return EVP_aes_128_cfb1();
    case AES_128_CFB8:
        return EVP_aes_128_cfb8();
    case AES_128_CFB128:
        return EVP_aes_128_cfb128();
    case AES_128_CTR:
        return EVP_aes_128_ctr();
    case AES_128_OFB:
        return EVP_aes_128_ofb();
    case AES_192_ECB:
        return EVP_aes_192_ecb();
    case AES_192_CBC:
        return EVP_aes_192_cbc();
    case AES_192_CFB:
        return EVP_aes_192_cfb();
    case AES_192_CFB1:
        return EVP_aes_192_cfb1();
    case AES_192_CFB8:
        return EVP_aes_192_cfb8();
    case AES_192_CFB128:
        return EVP_aes_192_cfb128();
    case AES_192_CTR:
        return EVP_aes_192_ctr();
    case AES_192_OFB:
        return EVP_aes_192_ofb();
    case AES_256_ECB:
        return EVP_aes_256_ecb();
    case AES_256_CBC:
        return EVP_aes_256_cbc();
    case AES_256_CFB:
        return EVP_aes_256_cfb();
    case AES_256_CFB1:
        return EVP_aes_256_cfb1();
    case AES_256_CFB8:
        return EVP_aes_256_cfb8();
    case AES_256_CFB128:
        return EVP_aes_256_cfb128();
    case AES_256_CTR:
        return EVP_aes_256_ctr();
    case AES_256_OFB:
        return EVP_aes_256_ofb();
    case SM4_128_CBC:
        return EVP_sm4_cbc();
    case SM4_128_ECB:
        return EVP_sm4_ecb();
    case SM4_128_CFB128:
        return EVP_sm4_cfb128();
    case SM4_128_OFB:
        return EVP_sm4_ofb();
    case SM4_128_CTR:
        return EVP_sm4_ctr();
    default:
        return nullptr;
    }
}