Coder Social home page Coder Social logo

angeal185 / jquery-hash Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 6 KB

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

Home Page: https://angeal185.github.io/jquery-hash

License: MIT License

jquery jquery-plugin sha1 sha256 sha512 sha384 hex base64 hash webcrypto

jquery-hash's Introduction

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)
});

jquery-hash's People

Contributors

angeal185 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

jquery-hash's Issues

Browser support?

It would be helpful if you posted some minimal browser support in the Readme.

Since this is a jquery plugin, does it support all browsers jquery supports?

Just happened across this doing some research on uploading file chunks with hash for integrity checks. Not familiar with the crypto api. Might help someone else along the way =)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.