ChaCha20 and XChaCha20 stream ciphers for MoonBit (RFC 8439)
Dependencies
use moonbitlang/mb-chacha
fn main {
let key = Bytes::from_hex("000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f")
let nonce = Bytes::from_hex("000000000000004a00000000")
let cipher = ChaCha20::new(key, nonce)?
cipher.apply_keystream(plaintext)
}ChaCha20 and XChaCha20 stream ciphers for MoonBit (RFC 8439)
Dependencies