MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / md5_buffer

Method md5_buffer

core/string/ustring.cpp:2840–2852  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2838}
2839
2840Vector<uint8_t> String::md5_buffer() const {
2841 CharString cs = utf8();
2842 unsigned char hash[16];
2843 CryptoCore::md5((unsigned char *)cs.ptr(), cs.length(), hash);
2844
2845 Vector<uint8_t> ret;
2846 ret.resize_uninitialized(16);
2847 uint8_t *ret_ptrw = ret.ptrw();
2848 for (int i = 0; i < 16; i++) {
2849 ret_ptrw[i] = hash[i];
2850 }
2851 return ret;
2852}
2853
2854Vector<uint8_t> String::sha1_buffer() const {
2855 CharString cs = utf8();

Callers 7

add_pathMethod · 0.80
remove_pathMethod · 0.80
get_file_hashMethod · 0.80
get_sizeMethod · 0.80
try_open_pathMethod · 0.80
has_pathMethod · 0.80
test_string.hFile · 0.80

Calls 4

ptrMethod · 0.45
lengthMethod · 0.45
resize_uninitializedMethod · 0.45
ptrwMethod · 0.45

Tested by

no test coverage detected