easy-sha256
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "easy-sha256", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A Simple and Easy way to use SHA256 in the browser or in NodeJS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,2 +8,5 @@ # Easy Sha256 | ||
Browser | ||
``` | ||
<script src="https://cdn.trat.chat/sha256.min.js"></script> | ||
``` | ||
@@ -14,1 +17,26 @@ NodeJS | ||
``` | ||
### Usage | ||
NodeJS | ||
``` | ||
var sha256 = require("easy-sha256") | ||
console.log(sha256.hash("abc")) //Logs "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad" | ||
``` | ||
Browser (include the script tag above in your html) | ||
``` | ||
console.log(sha256.hash("abc")) //Logs "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad" | ||
``` | ||
###Advanced Usage | ||
To use sha256 in async mode | ||
``` | ||
sha256.hash("abc",{async:true}).then(function(hash){ | ||
console.log(hash) | ||
}) | ||
console.log("hi") | ||
//Logs "hi" First Then "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad" | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14866
41