md5 import var crypto = require('crypto'); encrypt var beforeMD5 = 'Hello World'; var afterMD5 = crypto.createHash('md5').update(beforeMD5).digest('hex'); decrypt can't decrypt verify if (afterMD5 === crypto.createHash('md5').update(beforeMD5).digest('hex')) { // .. }