MCPcopy Create free account
hub / github.com/codetheweb/tuyapi / md5

Method md5

lib/cipher.js:266–269  ·  view source on GitHub ↗

* Calculates a MD5 hash. * @param {String} data to hash * @returns {String} characters 8 through 16 of hash of data

(data)

Source from the content-addressed store, hash-verified

264 * @returns {String} characters 8 through 16 of hash of data
265 */
266 md5(data) {
267 const md5hash = crypto.createHash('md5').update(data, 'utf8').digest('hex');
268 return md5hash.slice(8, 24);
269 }
270
271 /**
272 * Gets the key used for encryption/decryption

Callers 1

_encodePre34Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected