https://github.com/keccak256js/keccak256
A wrapper for the keccak library to compute 256 bit keccak hash in JavaScript.
https://github.com/keccak256js/keccak256
algorithm crypto cryptography function hashing javascript keccak keccak-256 keccak256 library sha3 sha3-256 tools typescript utility wrapper
Last synced: about 1 month ago
JSON representation
A wrapper for the keccak library to compute 256 bit keccak hash in JavaScript.
- Host: GitHub
- URL: https://github.com/keccak256js/keccak256
- Owner: keccak256js
- License: mit
- Created: 2018-10-23T04:12:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-04-03T20:03:08.000Z (2 months ago)
- Last Synced: 2025-04-18T01:01:01.186Z (about 2 months ago)
- Topics: algorithm, crypto, cryptography, function, hashing, javascript, keccak, keccak-256, keccak256, library, sha3, sha3-256, tools, typescript, utility, wrapper
- Language: JavaScript
- Homepage: https://github.com/keccak256js/keccak256
- Size: 343 KB
- Stars: 64
- Watchers: 2
- Forks: 6
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# keccak256
> A wrapper for the [`keccak`](https://www.npmjs.com/package/keccak) library to compute 256 bit keccak hash in JavaScript.
[](https://raw.githubusercontent.com/miguelmota/keccak256/master/LICENSE.md)
[](https://github.com/feross/standard)
## Install
```bash
npm install keccak256
```### CDN
Available on [jsDelivr](https://www.jsdelivr.com/) CDN:
```html
```
## Usage
- **keccak256**(data) -> {Buffer}
- {String | Buffer} data - data string or BufferReturns a Buffer
## Getting Started
```js
const keccak256 = require('keccak256')console.log(keccak256('hello').toString('hex')) // "1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8"
console.log(keccak256(Buffer.from('hello')).toString('hex')) // "1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8"
```## Test
```bash
npm test
```## License
Released under the [MIT](./LICENSE) license.
© [Miguel Mota](https://github.com/miguelmota)