Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A 16-digit hashing function

Is there a hash function that returns a 16-digit hex value (as MD5 returns 32-digit), or is there a library (for C++) in which I can use MD5 or SHA-1 which returns a 16-digit value

like image 717
Aly Avatar asked Jun 25 '26 21:06

Aly


2 Answers

Since you're willing to live with the much-higher collision rate, you can just truncate the MD5 hash of the data.

like image 56
Ignacio Vazquez-Abrams Avatar answered Jun 27 '26 12:06

Ignacio Vazquez-Abrams


is there a library (for C++) in which I can use MD5 or SHA-1 which returns a 16-digit value

Lookup the OpenSSL crypto library (free) or RSA BSAFE (paid).

like image 21
dirkgently Avatar answered Jun 27 '26 11:06

dirkgently



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!