MySQL 8.0.40
Source Code Documentation
digest.h File Reference

Constants and functionality that facilitate working with digests. More...

Go to the source code of this file.

Macros

#define DIGEST_HASH_TO_STRING(_hash, _str)
 Write SHA-256 hash value in a string to be used as DIGEST for the statement. More...
 
#define DIGEST_HASH_TO_STRING_LENGTH   64
 SHA-256 = 32 bytes of binary = 64 printable characters. More...
 

Detailed Description

Constants and functionality that facilitate working with digests.

Macro Definition Documentation

◆ DIGEST_HASH_TO_STRING

#define DIGEST_HASH_TO_STRING (   _hash,
  _str 
)
Value:
(void)sprintf(_str, \
"%02x%02x%02x%02x%02x%02x%02x%02x" \
"%02x%02x%02x%02x%02x%02x%02x%02x" \
"%02x%02x%02x%02x%02x%02x%02x%02x" \
"%02x%02x%02x%02x%02x%02x%02x%02x", \
_hash[0], _hash[1], _hash[2], _hash[3], _hash[4], _hash[5], \
_hash[6], _hash[7], _hash[8], _hash[9], _hash[10], _hash[11], \
_hash[12], _hash[13], _hash[14], _hash[15], _hash[16], \
_hash[17], _hash[18], _hash[19], _hash[20], _hash[21], \
_hash[22], _hash[23], _hash[24], _hash[25], _hash[26], \
_hash[27], _hash[28], _hash[29], _hash[30], _hash[31])

Write SHA-256 hash value in a string to be used as DIGEST for the statement.

◆ DIGEST_HASH_TO_STRING_LENGTH

#define DIGEST_HASH_TO_STRING_LENGTH   64

SHA-256 = 32 bytes of binary = 64 printable characters.