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