B2G/gecko/browser/modules/NewTabUtils.jsm
/**
 * Calculate the MD5 hash for a string.
 * @param aValue
 *        The string to convert.
 * @return The base64 representation of the MD5 hash.
 */
Calculate the MD5 hash for a string.
@param aValue
The string to convert.
@return The base64 representation of the MD5 hash.
Calculate the MD5 hash for a string . @param aValue The string to convert . @return The base64 representation of the MD5 hash .
function toHash(aValue) {
  let value = gUnicodeConverter.convertToByteArray(aValue);
  gCryptoHash.init(gCryptoHash.MD5);
  gCryptoHash.update(value, value.length);
  return gCryptoHash.finish(true);
}
function toHash ( aValue ) { let value = gUnicodeConverter . convertToByteArray ( aValue ) ; gCryptoHash . init ( gCryptoHash . MD5 ) ; gCryptoHash . update ( value , value . length ) ; return gCryptoHash . finish ( true ) ; }
Calculate the MD5 hash for a string.
Calculate the MD5 hash for a string .