MySQL 8.0.30
Source Code Documentation
my_sha2.cc File Reference

A compatibility layer to our built-in SSL implementation, to mimic the oft-used external library, OpenSSL. More...

#include "sha2.h"

Macros

#define GEN_OPENSSL_EVP_SHA2_BRIDGE(size)
 

Detailed Description

A compatibility layer to our built-in SSL implementation, to mimic the oft-used external library, OpenSSL.

Macro Definition Documentation

◆ GEN_OPENSSL_EVP_SHA2_BRIDGE

#define GEN_OPENSSL_EVP_SHA2_BRIDGE (   size)
Value:
unsigned char *SHA_EVP##size(const unsigned char *input_ptr, \
size_t input_length, \
char unsigned *output_ptr) { \
EVP_MD_CTX *md_ctx = EVP_MD_CTX_create(); \
EVP_DigestInit_ex(md_ctx, EVP_sha##size(), NULL); \
EVP_DigestUpdate(md_ctx, input_ptr, input_length); \
EVP_DigestFinal_ex(md_ctx, (unsigned char *)output_ptr, NULL); \
EVP_MD_CTX_destroy(md_ctx); \
return (output_ptr); \
}
#define NULL
Definition: types.h:54