Skip to content

jQuery plugin to return a hash for a string using SHA 1/256/384/512 and the web crypto api

License

Notifications You must be signed in to change notification settings

angeal185/jquery-hash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jquery-hash

jQuery plugin to return a hash for a string using SHA 1/256/384/512 and the web crypto api

demo: https://angeal185.github.io/jquery-hash

Installation

npm

$ npm install jquery-hash --save

browser

<script src="./path-to/jquery.min.js"></script>
<script src="./dist/jq-hash.min.js"></script>

info

// demo

/**
* $.hash(str, digest, enc, cb)
* @param {string} str ~ string to be hashed
* @param {string} digest ~ 1/256/384/512
* @param {string} enc ~ hex/base64/Uint8
* @param {function} cb ~ callback
*/

$.hash('hello world!', '512', 'hex',function(i){
 console.log(i)
});