// mq-bridge
// © Copyright 2026, by Marco Mengelkoch
// Licensed under MIT License, see License file for more details
// git clone https://github.com/marcomq/mq-bridge
//! Wire-format constants of the crypto envelope. Kept out of [`super::crypto`]
//! so at-rest detection still works without the `encryption` feature.
pub const ENVELOPE_VERSION: u8 = 1;
pub const CIPHER_XCHACHA: u8 = 0;
pub const CIPHER_AES_GCM: u8 = 1;
pub const XCHACHA_NONCE_LEN: usize = 24;
pub const AES_GCM_NONCE_LEN: usize = 12;
/// Header (`version`, `cipher`, `key_id_len`) + shortest key id + shortest nonce.
pub const MIN_ENVELOPE_LEN: usize = 3 + 1 + AES_GCM_NONCE_LEN;