Function nacl::secret_box::open[][src]

pub fn open(c: &[u8], n: &[u8], k: &[u8]) -> Result<Vec<u8>, Error>
Expand description

This function opens xsalsa20+poly1305 formatted cipher, returning a message, trimmed of prefixed zeros, unlike crypto_secretbox_open from crypto_secretbox/xsalsa20poly1305/ref/box.c. Note also that cipher doesn’t have leading zeros, unlike C version.