mod crypto;
mod error;
mod notifications;
mod rumors;
mod types;
pub use self::crypto::{decrypt_push_token, encrypt_push_token};
pub use self::error::Mip05Error;
pub use self::notifications::{
build_notification_batches, build_notification_request_rumor, parse_notification_request_rumor,
};
pub use self::rumors::{
build_token_list_response_rumor, build_token_removal_rumor, build_token_request_rumor,
parse_group_message, parse_group_message_rumor,
};
pub use self::types::{
EncryptedToken, LeafTokenTag, Mip05GroupMessage, NotificationEventBatch, NotificationPlatform,
NotificationRequest, PushTokenPlaintext, TokenListResponse, TokenRemoval, TokenRequest,
TokenTag,
};
pub const NOTIFICATION_REQUEST_KIND: u16 = 446;
pub const TOKEN_REQUEST_KIND: u16 = 447;
pub const TOKEN_LIST_RESPONSE_KIND: u16 = 448;
pub const TOKEN_REMOVAL_KIND: u16 = 449;
pub const MAX_NOTIFICATION_REQUEST_TOKENS: usize = 25;
pub const TOKEN_PLAINTEXT_LEN: usize = 1024;
pub const ENCRYPTED_TOKEN_LEN: usize = 1084;
pub(crate) const EPHEMERAL_PUBKEY_LEN: usize = 32;
pub(crate) const NONCE_LEN: usize = 12;
pub(crate) const AEAD_TAG_LEN: usize = 16;
pub(crate) const TOKEN_CIPHERTEXT_LEN: usize = TOKEN_PLAINTEXT_LEN + AEAD_TAG_LEN;
const _: [(); ENCRYPTED_TOKEN_LEN] = [(); EPHEMERAL_PUBKEY_LEN + NONCE_LEN + TOKEN_CIPHERTEXT_LEN];
pub(crate) const TOKEN_TAG_NAME: &str = "token";
pub(crate) const TOKEN_ENCRYPTION_SALT: &[u8] = b"mip05-v1";
pub(crate) const TOKEN_ENCRYPTION_INFO: &[u8] = b"mip05-token-encryption";
pub(crate) const NOTIFICATION_REQUEST_VERSION: &str = "mip05-v1";
pub(crate) const VERSION_TAG_NAME: &str = "v";
pub(crate) const ENCODING_TAG_NAME: &str = "encoding";
pub(crate) const BASE64_ENCODING: &str = "base64";