|
Blender V4.5
|
#include <cstdio>#include <cstdlib>#include <cstring>#include <sys/types.h>#include "BLI_hash_md5.hh"Go to the source code of this file.
Classes | |
| struct | md5_ctx |
Macros | |
| #define | UINT_MAX_32_BITS 0xFFFFFFFF |
| #define | UINT_MAX UINT_MAX_32_BITS |
| #define | SWAP(n) |
| #define | FF(b, c, d) |
| #define | FG(b, c, d) |
| #define | FH(b, c, d) |
| #define | FI(b, c, d) |
| #define | CYCLIC(w, s) |
| #define | OP(a, b, c, d, s, T) |
| #define | OP(f, a, b, c, d, k, s, T) |
| #define | BLOCKSIZE 4096 |
Typedefs | |
| using | md5_uint32 = uint |
Functions | |
| static void | md5_init_ctx (md5_ctx *ctx) |
| static void | md5_process_block (const void *buffer, size_t len, md5_ctx *ctx) |
| static void * | md5_read_ctx (const md5_ctx *ctx, void *resbuf) |
| int | BLI_hash_md5_stream (FILE *stream, void *resblock) |
| void * | BLI_hash_md5_buffer (const char *buffer, size_t len, void *resblock) |
| char * | BLI_hash_md5_to_hexdigest (const void *resblock, char r_hex_digest[33]) |
Variables | |
| static const uchar | fillbuf [64] = {0x80, 0 } |
Functions to compute MD5 message digest of files or memory blocks according to the definition of MD5 in RFC 1321 from April 1992.
Definition in file hash_md5.cc.
| #define BLOCKSIZE 4096 |
Referenced by BLI_hash_md5_stream().
| #define CYCLIC | ( | w, | |
| s ) |
| #define FG | ( | b, | |
| c, | |||
| d ) |
Referenced by md5_process_block().
| #define FH | ( | b, | |
| c, | |||
| d ) |
Referenced by md5_process_block().
| #define FI | ( | b, | |
| c, | |||
| d ) |
Referenced by md5_process_block().
Referenced by md5_process_block().
| #define SWAP | ( | n | ) |
Definition at line 76 of file hash_md5.cc.
| #define UINT_MAX UINT_MAX_32_BITS |
Definition at line 44 of file hash_md5.cc.
Referenced by BLI_ghashIterator_init(), BLI_polyfill_beautify(), BM_mesh_edgenet(), bm_mesh_loops_calc_normals_for_vert_with_clnors(), blender::ed::transform::calculatePropRatio(), DNA_struct_find_index_without_alias(), DNA_struct_find_with_alias(), EDBM_edge_find_nearest_ex(), EDBM_face_find_nearest_ex(), EDBM_vert_find_nearest_ex(), edge_store_from_mface_tri(), gizmo_find_intersected_3d_intern(), btMiniSDF::interpolate(), loopcut_update_edge(), mesh_calc_tri_tessface(), mesh_init_data(), modify_mesh(), PE_create_random_generator(), polyedge_beauty_cost_update(), and GHOST_NDOFManager::setDevice().
| #define UINT_MAX_32_BITS 0xFFFFFFFF |
Definition at line 34 of file hash_md5.cc.
| using md5_uint32 = uint |
Definition at line 48 of file hash_md5.cc.
| void * BLI_hash_md5_buffer | ( | const char * | buffer, |
| size_t | len, | ||
| void * | resblock ) |
Compute MD5 message digest for 'len' bytes beginning at 'buffer'. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest.
Definition at line 346 of file hash_md5.cc.
References BLI_hash_md5_buffer(), fillbuf, len(), md5_init_ctx(), md5_process_block(), md5_read_ctx(), pad, and SWAP.
Referenced by BLI_hash_md5_buffer(), IMB_thumb_load_font_get_hash(), render_result_exr_file_cache_path(), and thumbpathname_from_uri().
| int BLI_hash_md5_stream | ( | FILE * | stream, |
| void * | resblock ) |
Compute MD5 message digest for bytes read from 'stream'. The resulting message digest number will be written into the 16 bytes beginning at 'resblock'.
Definition at line 273 of file hash_md5.cc.
References BLI_hash_md5_stream(), BLOCKSIZE, fillbuf, len(), md5_init_ctx(), md5_process_block(), md5_read_ctx(), pad, and SWAP.
Referenced by BLI_hash_md5_stream().
| char * BLI_hash_md5_to_hexdigest | ( | const void * | resblock, |
| char | r_hex_digest[33] ) |
Definition at line 382 of file hash_md5.cc.
References BLI_hash_md5_to_hexdigest(), and len().
Referenced by BLI_hash_md5_to_hexdigest(), IMB_thumb_load_font_get_hash(), render_result_exr_file_cache_path(), and thumbpathname_from_uri().
|
static |
Initialize structure containing state of computation. (RFC 1321, 3.3: Step 3)
Definition at line 87 of file hash_md5.cc.
References md5_ctx::A, md5_ctx::B, md5_ctx::C, md5_ctx::D, and md5_init_ctx().
Referenced by BLI_hash_md5_buffer(), BLI_hash_md5_stream(), and md5_init_ctx().
|
static |
Starting with the result of former calls of this function (or the initialization), this function updates the 'ctx' context for the next 'len' bytes starting at 'buffer'. It is necessary that 'len' is a multiple of 64!!!
Definition at line 100 of file hash_md5.cc.
References A, md5_ctx::A, B, md5_ctx::B, C, md5_ctx::C, D, md5_ctx::D, FG, FH, FI, len(), md5_process_block(), and OP.
Referenced by BLI_hash_md5_buffer(), BLI_hash_md5_stream(), and md5_process_block().
|
static |
Put result from 'ctx' in first 16 bytes of 'resbuf'. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest.
Definition at line 260 of file hash_md5.cc.
References md5_ctx::A, md5_ctx::B, md5_ctx::C, md5_ctx::D, md5_read_ctx(), and SWAP.
Referenced by BLI_hash_md5_buffer(), BLI_hash_md5_stream(), and md5_read_ctx().
|
static |
Definition at line 81 of file hash_md5.cc.
Referenced by BLI_hash_md5_buffer(), and BLI_hash_md5_stream().