util.js 214 B

12345678910
  1. var crypto = require('crypto');
  2. exports.sha1 = function (str) {
  3. var md5sum = crypto.createHash('sha1');
  4. md5sum.update(str, 'utf8');
  5. str = md5sum.digest('hex');
  6. return str;
  7. }
  8. exports.SERVER = '/';