HSalsa20 is a one-way function used in XSalsa20 to extend nonce, and in NaCl to hash X25519 shared keys. It takes 32-byte key and 16-bytes src and writes 32-byte result into dst and returns it.
Generate Salsa20/20 stream for the given 32-byte key and 24-byte nonce and write it into dst and return it.
Never use the same key and nonce to generate more than one stream.
stream is like streamXOR with all-zero src.
Encrypt src with Salsa20/20 stream generated for the given 32-byte key and 24-byte and write the result into dst and return it.
dst and src may be the same, but otherwise must not overlap.
Never use the same key and nonce to encrypt more than one message.
Generated using TypeDoc