const KEY_ALGO = { 'name': 'AES-GCM', 'length': 128 }; const NUM_PREKEYS = 50; // Set by a key backup restore until the restored device is published const OMEMO_RESTORED_KEY = 'omemoRestored'; const SIGNED_PREKEY_ID = 1; // XEP-0454: the whole message is the URL, the fragment is IV (12 or 16 bytes) + key (32 bytes) const AESGCM_REGEX = /^aesgcm:\/\/([^\s#]+\/([^\/\s#]+\.([a-z0-9]+)))#([0-9a-f]{88}|[0-9a-f]{96})$/i; const AESGCM_TYPES = { jpg: 'image/jpeg', jpeg: 'image/jpeg', png: 'image/png', gif: 'image/gif', webp: 'image/webp', avif: 'image/avif', opus: 'audio/ogg', ogg: 'audio/ogg', oga: 'audio/ogg', mp3: 'audio/mpeg', m4a: 'audio/mp4', aac: 'audio/aac', mp4: 'video/mp4', m4v: 'video/mp4', webm: 'video/webm', mov: 'video/quicktime' };