Generate Salsa20/20 stream for the given 32-byte key and 8-byte nonce and write it into dst and return it.
Never use the same key and nonce to generate more than one stream.
If nonceInplaceCounterLength is not 0, it behaves the same with respect to the nonce as described in streamXOR documentation.
stream is like streamXOR with all-zero src.
Encrypt src with Salsa20/20 stream generated for the given 32-byte key and 8-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.
If nonceInplaceCounterLength is not 0, the nonce is assumed to be a 16-byte array with stream counter in first nonceInplaceCounterLength bytes and nonce in the last remaining bytes. The counter will be incremented inplace for each Salsa20 block. This is useful if you need to encrypt one stream of data in chunks.
Generated using TypeDoc