MCPcopy Index your code
hub / github.com/TheAlgorithms/JavaScript / hexMD5

Function hexMD5

Hashes/tests/MD5.test.js:9–13  ·  view source on GitHub ↗

* Returns the MD5 hash of the given message as a hexadecimal string * * @param {Uint8Array} message - message to hash * @return {string} - hash as a hexadecimal string

(message)

Source from the content-addressed store, hash-verified

7 * @return {string} - hash as a hexadecimal string
8 */
9function hexMD5(message) {
10 return Array.from(MD5(message), (byte) =>
11 byte.toString(16).padStart(2, '0')
12 ).join('')
13}
14
15describe('Testing MD5 function', () => {
16 it('should return the correct hash for "The quick brown fox jumps over the lazy dog"', () => {

Callers 1

MD5.test.jsFile · 0.85

Calls 2

MD5Function · 0.90
toStringMethod · 0.45

Tested by

no test coverage detected