UNPKG

easy-sha256

Version:

A Simple and Easy way to use SHA256 in the browser or in NodeJS

15 lines (9 loc) 384 B
var Sha256 = require("./index.js") //Regular Example console.log(Sha256.hash("abc")) //Logs "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad" // Advanced Async Callback Example Sha256.hash("abc",{async:true}).then(function(hash){ console.log(hash) }) console.log("hi") //Logs "hi" First Then "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"