New: Introducing PHP and Composer Support.Read the Announcement
Socket
Book a DemoInstallSign in
Socket

cryptocoin-sha256

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cryptocoin-sha256

Compute SHA256 of bytes or strings.

Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

convert-sha256

JavaScript component to compute the SHA256 of strings or bytes.

AMD/CommonJS compatible.

Install

Node.js/Browserify

npm install --save cryptocoin-sha256

Component

component install cryptocoinjs/sha256

Bower

bower install cryptocoin-sha256

Script

<script src="/path/to/sha256.js"></script>

Usage

sha256(input)

input either an array of bytes or a string

sha256("hello") //"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"

you can verify:

printf "hello" | shasum -a 256

Credits

Loosely inspired by code from here: https://github.com/vbuterin/bitcoinjs-lib & CryptoJS

References on JavaScript UTF-8 forced encoding

(these sources are also included as PDFs in the repo in case the links go dead)

License

(MIT License)

Copyright 2013, JP Richardson jprichardson@gmail.com

Keywords

string

FAQs

Package last updated on 04 Nov 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts