https://github.com/elbywan/shannon-bindings
Shannon cipher node.js bindings
https://github.com/elbywan/shannon-bindings
shannon shannon-algorithm shannon-cipher
Last synced: 6 months ago
JSON representation
Shannon cipher node.js bindings
- Host: GitHub
- URL: https://github.com/elbywan/shannon-bindings
- Owner: elbywan
- License: mit
- Created: 2019-01-12T20:05:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-12T20:13:55.000Z (over 6 years ago)
- Last Synced: 2025-02-05T21:35:54.714Z (8 months ago)
- Topics: shannon, shannon-algorithm, shannon-cipher
- Language: C
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shannon-bindings
#### Node.js bindings for the Shannon cipherCheck the [reference implementation repository mirror](https://github.com/timniederhausen/shannon) for more details.
## Setup
`npm i shannon-bindings`
## Usage
```js
const Shannon = require('shannon-bindings')const shannon = new Shannon(key /* Buffer */)
shannon.nonce(nonce /* Buffer */)
shannon.decrypt(encryptedBuffer /* Buffer, decrypted in place */)
shannon.encrypt(buffer /* Buffer, encrypted in place */)/* mac is calculated in-place */
const mac = Buffer.alloc(N)
shannon.mac(mac)
```