Skip to content

elbywan/shannon-bindings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shannon-bindings

Node.js bindings for the Shannon cipher

Check the reference implementation repository mirror for more details.

Setup

npm i shannon-bindings

Usage

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)