Skip to main content

Module application_crypto

Module application_crypto 

Source
Expand description

Transport-agnostic application payload encryption envelope.

This mirrors the TypeScript createSharedSecretApplicationCrypto 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§

ApplicationCryptoFrameDecoder

Enums§

ApplicationCryptoError
ApplicationCryptoStreamError

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_encrypted_payload
is_application_encrypted_payload
open_application_payload
protect_application_payload
protect_application_payload_with_nonce
protect_application_payload_with_nonce_and_sequence
protect_raw_stream_frame
protect_raw_stream_frame_with_nonce