https://github.com/browserify/createhmac
Node style HMAC for use in the browser, with native implementation in node
https://github.com/browserify/createhmac
Last synced: 8 months ago
JSON representation
Node style HMAC for use in the browser, with native implementation in node
- Host: GitHub
- URL: https://github.com/browserify/createhmac
- Owner: browserify
- License: mit
- Created: 2015-01-14T13:04:52.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2024-12-21T10:00:04.000Z (about 1 year ago)
- Last Synced: 2025-06-05T00:52:07.739Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 61
- Watchers: 4
- Forks: 22
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# create-hmac
[](https://www.npmjs.org/package/create-hmac)
[](https://travis-ci.org/crypto-browserify/createHmac)
[](https://david-dm.org/crypto-browserify/createHmac#info=dependencies)
[](https://github.com/feross/standard)
Node style HMACs for use in the browser, with native HMAC functions in node. API is the same as HMACs in node:
```js
var createHmac = require('create-hmac')
var hmac = createHmac('sha224', Buffer.from('secret key'))
hmac.update('synchronous write') //optional encoding parameter
hmac.digest() // synchronously get result with optional encoding parameter
hmac.write('write to it as a stream')
hmac.end() //remember it's a stream
hmac.read() //only if you ended it as a stream though
```