Module box_stream::crypto
[−]
[src]
Low-level bindings to box-stream-c. You probably don't need to use this module directly.
Structs
PlainHeader |
The result of decrypting a cypher_header. This is
|
Constants
CYPHER_HEADER_SIZE |
The size of an encrypted header: The header's mac, the length of the following packet, and the mac of the following packet. |
CYPHER_HEADER_SIZE_U16 |
CYPHER_HEADER_SIZE as a u16 |
MAX_PACKET_SIZE |
The maximum allowed size of a single packet passed to |
MAX_PACKET_USIZE |
Same as |
Functions
decrypt_header⚠ |
If this returns true, it decrypts a received header into |
decrypt_header_inplace⚠ |
Same as |
decrypt_packet⚠ |
Decrypts a received packet, given a pointer to the corresponding
plain_header, and writes the result into |
decrypt_packet_inplace⚠ |
Same as |
encrypt_packet⚠ |
Writes the encrypted header and payload for a given plaintext packet into |
final_header⚠ |
Writes the final header that signals the end of the box stream into |