* Calculates a MD5 hash. * @param {String} data to hash * @returns {String} characters 8 through 16 of hash of data
(data)
| 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 |