Skip to content

p-j/meteor-crypto-sha256

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SHA256 algorithm from CryptoJS.

Build Status

Dependency

Install

Inside your project folder run

$ meteor add jparker:crypto-sha256

The following method under the CryptoJS namespace will now be available on both the client and server:

CryptoJS.SHA256(message)

If jparker:crypto-hmac is also installed, the following method will also be available:

CryptoJS.HmacSHA256(message, key)

Usage

SHA256 digest of a string:

CryptoJS.SHA256("Message").toString()
// "2f77668a9dfbf8d5848b9eeb4a7145ca94c6ed9236e4a773f6dcafa5132b2f91"

SHA256 HMAC of a string, given a passphrase:

CryptoJS.HmacSHA256("Message", "Secret Passphrase").toString()
// "32c647602ab4c4c7543e9c50ae25e567c3354e1532b11649ce308e6e2568d205"

See also

The CryptoJS project lives at https://code.google.com/p/crypto-js/ and the documentation for Hashers is at https://code.google.com/p/crypto-js/#Hashers.

Related packages

Credits

Based on Eelco Wiersma's work

About

SHA-256 algo for meteor-crypto, standard secure crypto algorithms repackaged from CryptoJS

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •