Crate private_box [] [src]

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.

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 7.

init

Must be called before using private_box::encrypt or private_box::decrypt. Initialises libsodium.