Struct onionsalt::OnionBox
[−]
[src]
pub struct OnionBox { /* fields omitted */ }
Methods
impl OnionBox
[src]
fn packet(&self) -> [u8; 1024]
The encrypted packet, to be sent to the first receiver.
fn return_magic(&self) -> [u8; 32]
The response when we get it will begin with these bytes.
fn read_return(
&self,
payload_key: KeyPair,
msg: &[u8; 1024]
) -> Result<[u8; 544], NaClError>
&self,
payload_key: KeyPair,
msg: &[u8; 1024]
) -> Result<[u8; 544], NaClError>
This function accepts a packet that has been sent to us, and decrypts it without authentication if it is the response to our original message.
fn add_payload(
&mut self,
payload_key: KeyPair,
payload_contents: &[u8; 544]
) -> &mut Self
&mut self,
payload_key: KeyPair,
payload_contents: &[u8; 544]
) -> &mut Self
fn add_encryptedpayload(&mut self, ciphertext: &[u8; 592]) -> &mut Self
Trait Implementations
impl Hash for OnionBox
[src]
fn hash<H: Hasher>(&self, h: &mut H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for OnionBox
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for OnionBox
[src]
fn eq(&self, o: &OnionBox) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.