示例#1
0
  module.exports = function (message, options) {
    if(typeof message == 'undefined')
      return;

    var digestbytes = crypt.wordsToBytes(md5(message, options));
    return options && options.asBytes ? digestbytes :
        options && options.asString ? bin.bytesToString(digestbytes) :
        crypt.bytesToHex(digestbytes);
  };
  module.exports = function (message, options) {
    if (message === undefined || message === null)
      throw new Error('Illegal argument ' + message);

    var digestbytes = crypt.wordsToBytes(md5(message, options));
    return options && options.asBytes ? digestbytes :
        options && options.asString ? bin.bytesToString(digestbytes) :
        crypt.bytesToHex(digestbytes);
  };
示例#3
0
文件: md5.js 项目: DrJaxx/KidMonstar
 module.exports = function (message, options) {
   var digestbytes = crypt.wordsToBytes(md5(message));
   return options && options.asBytes ? digestbytes :
       options && options.asString ? bin.bytesToString(digestbytes) :
       crypt.bytesToHex(digestbytes);
 };