Toggle menu

crypto-js

CryptoJs is a collection of standard and secure cryptographic algorithms implemented in JavaScript.

This library is distributed under the MIT license, its source is www.npmjs.com/package/crypto-js (opens new window). For full documentation see code.google.com/archive/p/crypto-js/ (opens new window).

Executed

Server-side.

Details

var CryptoJs = require('crypto-js');A full example of possible encryptions is included in the GOSS.Examples.NodeModules group of the End Point library. 

Example

function(params, credentials) {
    var CryptoJs = require('crypto-js'),
    strData = "Hello!"
    var result = CryptoJs.SHA256(strData).toString();
    return result;
}

{
    "jsonrpc": "2.0",
    "id": 240,
    "result": "334d016f755cd6dc58c53a86e183882f8ec14f52fb05345887c8a5edd42c87b7"
}

Last modified on 10 March 2020

Share this page

Facebook icon Twitter icon email icon

Print

print icon