Toggle menu

hash

Generates either an MD5 or SHA1 hash. Use crypto-js.

Executed

Server-side

Details

var hash = require('hash');

Input can be either a string or buffer. The output is a string.

MethodDescription
md5Generates an MD5 hash
sha1Generates an SHA1 hash

Example

function( params, credentials ) {
    var hash = require('hash');
    var result = hash.md5('whatever');
    return result;
}

{
    "jsonrpc": "2.0",
    "id": 183,
    "result": "008c5926ca861023c1d2a36653fd88e2"
}

Last modified on 10 March 2020

Share this page

Facebook icon Twitter icon email icon

Print

print icon