⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
server
/
nginx
/
src
/
ngx_devel_kit
/
src
/
View File Name :
ndk_hash.c
#include <ndk_hash.h> /* openssl hashes */ #define NDK_OPENSSL_HASH(type,ctxt_type,upper) \ u_char md [ctxt_type ## _DIGEST_LENGTH]; \ ctxt_type ##_CTX c; \ \ type ## _Init (&c); \ type ## _Update (&c, data, len); \ type ## _Final (md, &c); \ \ ndk_hex_dump (p, (u_char *) md, ctxt_type ## _DIGEST_LENGTH); \ if (upper) { \ ndk_strtoupper (p, (ctxt_type ## _DIGEST_LENGTH) *2); \ } #ifdef NDK_MD5 void ndk_md5_hash (u_char *p, char *data, size_t len) { NDK_OPENSSL_HASH (MD5, MD5, 0); } void ndk_md5_hash_upper (u_char *p, char *data, size_t len) { NDK_OPENSSL_HASH (MD5, MD5, 1); } #endif #ifdef NDK_SHA1 void ndk_sha1_hash (u_char *p, char *data, size_t len) { NDK_OPENSSL_HASH (SHA1, SHA, 0); } void ndk_sha1_hash_upper (u_char *p, char *data, size_t len) { NDK_OPENSSL_HASH (SHA1, SHA, 1); } #endif /* non-openssl hashes */ #ifdef NDK_MURMUR2 #include "hash/murmurhash2.c" void ndk_murmur2_hash (u_char *p, char *data, size_t len) { uint32_t hash; hash = MurmurHash2 (data, len, 47); ndk_hex_dump (p, (u_char*) &hash, 4); } void ndk_murmur2_hash_upper (u_char *p, char *data, size_t len) { uint32_t hash; hash = MurmurHash2 (data, len, 47); ndk_hex_dump (p, (u_char*) &hash, 4); ndk_strtoupper (p, 8); } #endif