shannon
Pure javascript implementation of Shannon stream cipher. No-brainer port of shannon.
Shannon cipher is used in Spotify Connect to encrypt communication between player and Spotify AP server. Shannon cipher is variant of Sober stream cipher.
Example
Encryption
const Shannon = ; let key = Buffer;let message = 'My secret message'; let cipher = key;let message = cipher;// message contains ciphertext nowlet mac = cipher;// mac contains MAC of the message
Decryption
const Shannon = ; let key = Buffer;// message is encryptedlet message = Buffer;let receivedMac = Buffer;let cipher = key;let message = cipher;// message contains plaintext nowlet mac = cipher;if Buffer console