Crate private_box

Source

Structs§

Keypair
A public/secret long-term key pair.
MsgKey
PublicKey
The public half of a Keypair.

Functions§

decrypt
Attempt to decrypt a private-box message, using your secret key. If you were an intended recipient then the decrypted message is returned as Some(Vec<u8>). If it was not for you, then None will be returned.
decrypt_body
decrypt_body_with_key_bytes
Panics if msg_key len is not 33 bytes.
decrypt_key
encrypt
Takes the message you want to encrypt, and an array of recipient public keys. Returns a message that is encrypted to all recipients and openable by them with private_box::decrypt. The number of recipients must be between 1 and 32.
encrypt_into
encrypted_size
== 72 + recps.len() * 49 + text.len()