Implementation of Salsa20 digester.
Salsa20 is a stream cipher designed to be highly efficient and secure. It operates on 512-bit (64-byte) blocks and accepts a 256-bit (32-byte) key and a 64-bit (8-byte) nonce.
Decrypts the given byte array data.
Encrypts the given byte array data.
import tern.digest.salsa20; ubyte[] data = [1, 2, 3, 4, 5]; string key = "my_secret_key"; // Must be exactly 256 bits (32 bytes) in length. ubyte[8] nonce = [0, 0, 0, 0, 0, 0, 0, 0]; // Must be exactly 64 bits (8 bytes) in length. Salsa20.encrypt(data, key, nonce);
See Implementation
Implementation of Salsa20 digester.
Salsa20 is a stream cipher designed to be highly efficient and secure. It operates on 512-bit (64-byte) blocks and accepts a 256-bit (32-byte) key and a 64-bit (8-byte) nonce.