1.0.5 • Published 5 years ago

easy-sha256 v1.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Easy Sha256

A simple way to use SHA256 in the browser and NodeJS. Built in pure JS without any 3rd party libraries or dependencies.

Installing

Browser

<script src="https://cdn.trat.chat/sha256.min.js"></script>

NodeJS

npm i easy-sha256

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"

###Author

Ryan Trattner

My Github Trat Chat ryan@trat.io

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago