34#define MAX_DIGEST_STORAGE_SIZE (1024 * 1024)
40#define DIGEST_HASH_TO_STRING(_hash, _str) \
42 "%02x%02x%02x%02x%02x%02x%02x%02x" \
43 "%02x%02x%02x%02x%02x%02x%02x%02x" \
44 "%02x%02x%02x%02x%02x%02x%02x%02x" \
45 "%02x%02x%02x%02x%02x%02x%02x%02x", \
46 _hash[0], _hash[1], _hash[2], _hash[3], _hash[4], _hash[5], \
47 _hash[6], _hash[7], _hash[8], _hash[9], _hash[10], _hash[11], \
48 _hash[12], _hash[13], _hash[14], _hash[15], _hash[16], \
49 _hash[17], _hash[18], _hash[19], _hash[20], _hash[21], \
50 _hash[22], _hash[23], _hash[24], _hash[25], _hash[26], \
51 _hash[27], _hash[28], _hash[29], _hash[30], _hash[31])
54#define DIGEST_HASH_TO_STRING_LENGTH 64
90#define DIGEST_HASH_SIZE 32
147 if (byte_count_copy > 0) {
169 unsigned char *hash);
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:168
Some integer typedefs for easier portability.
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
void compute_digest_hash(const sql_digest_storage *digest_storage, unsigned char *hash)
Compute a digest hash.
Definition: sql_digest.cc:159
void compute_digest_text(const sql_digest_storage *digest_storage, String *digest_text)
Compute a digest text.
Definition: sql_digest.cc:170
ulong get_max_digest_length()
Definition: sql_digest.cc:50
#define DIGEST_HASH_SIZE
DIGEST hash size, in bytes.
Definition: sql_digest.h:90
Structure to store token count/array for a statement on which digest is to be calculated.
Definition: sql_digest.h:98
void copy(const sql_digest_storage *from)
Definition: sql_digest.h:137
uint m_charset_number
Character set number.
Definition: sql_digest.h:103
sql_digest_storage()
Definition: sql_digest.h:120
size_t m_byte_count
Definition: sql_digest.h:100
unsigned char m_hash[DIGEST_HASH_SIZE]
Definition: sql_digest.h:101
bool m_full
Definition: sql_digest.h:99
unsigned char * m_token_array
Token array.
Definition: sql_digest.h:116
void reset(unsigned char *token_array, size_t length)
Definition: sql_digest.h:122
bool is_empty()
Definition: sql_digest.h:135
void reset()
Definition: sql_digest.h:128
size_t m_token_array_length
Definition: sql_digest.h:118
unsigned int uint
Definition: uca9-dump.cc:75