Skip to main content

Module application_crypto

Module application_crypto 

Source
Expand description

Transport-agnostic application payload encryption envelope.

This mirrors the TypeScript createSharedCrypto envelope: ORTCE1 || version || nonce || XChaCha20-Poly1305(type_id || payload). It is intentionally separate from raw iroh stream APIs so native callers can opt into the same app-layer E2EE format before writing application bytes.

Structs§

CryptoFrameDecoder

Enums§

CryptoError
CryptoStreamError

Constants§

APPLICATION_ENVELOPE_MAGIC
APPLICATION_ENVELOPE_VERSION_REPLAY
APPLICATION_KEY_BYTES
APPLICATION_NONCE_BYTES
APPLICATION_REPLAY_SEQUENCE_BYTES
DEFAULT_MAX_RAW_FRAME_BYTES
RAW_STREAM_TYPE_ID

Functions§

frame_payload
is_encrypted_payload
open_payload
protect_frame
protect_payload
protect_with_nonce