encryption/MegolmMessageEncryptionService Service
File: src/services/encryption/MegolmMessageEncryptionService.ts
Overview
Exports
- MegolmEncryptionStatus - interface export
- MegolmEncryptedMessageData - interface export
- MegolmMessageEncryptionService - class export
- megolmMessageEncryptionService - const export
Classes
MegolmMessageEncryptionService
No description available.
Methods:
constructorgetInstanceinitializecatchtryAutoUnlockstoreSessionKeysclearLegacyStoragelockEncryptioninitializeWithRecoveryKeysetupNewEncryptioncompleteSetupWithWordsensureIdentityKeyPairencryptMessagedecryptMessagedecryptMegolmMessageensureSessionSharedencryptSessionKeyForUserencryptPrivateKeyForStorageclaimPendingSessionSharesdecryptSessionKeyForMegetEncryptionStatusisUnlockedhasRecoveryKeybackupSessionsgetCurrentUserIdisInitializedresetEncryptioncleanup
Properties:
instancecurrentUserIdinitializedINITIALIZATIONuserdatabasedataMegolmMessageEncryptionServiceauthUserIdIDrealtimedecryptiondetailtruesessionfalsestoredKeyskeyresultfallbackstoredDatawordsderivedKeysMigrateencryptionKeybackupKeysigningKeyphrasemnemonicexistsbackupfailedsharesclaimedCountfulfilledCountrequestsconfirmsserviceexchangecodeverificationCodep_user_idp_verification_codep_word_countisUnlockedhasRecoveryKeykeyPairnamebase64KeyRawKeyBase64DBencryptedPrivateKeysupabaseuser_ididentity_public_keyidentity_private_key_encrypteddevice_idis_activeaccessDECRYPTIONcontentroomIdrecipientIdsplaintextContentencryptedMessagesharedtextencryptedContenttypeencryptedencryption_metadataalgorithmsession_idmessage_indexsender_user_idtimestampmessagechannel_idconversation_idfieldsencrypted_keyssender_key_idivmetadatacontextkeysOPTIMIZEDsessionIdmessageIndexsenderIdciphertextobjectPATHdecryptedJsondecryptedContentserverclaimedsendererrorSHARINGrecipientsusersNeedingSessionsessionDataBATCHkeyMapusersWithKeysusersWithoutKeysPARALLELsharePromisesencryptedSessionKeyKeyshareroom_idrecipient_user_idencrypted_session_keyfirst_known_indexonConflictresultssuccessCountsessionKeyrecipientPublicKeyderivationsimilarencoderderivedKeycombinedstorage0parallelp_share_idusdecryptdecrypteddecoderUTILITIESstatusenabledhasBackupneedsSetupmodeNoteupexisthasKeysessionslogoutnull
Interfaces
MegolmEncryptionStatus
No description available.
typescript
interface MegolmEncryptionStatus {
enabled: boolean
hasRecoveryKey: boolean
hasBackup: boolean
needsSetup: boolean
mode: 'disabled' | 'optional' | 'required'
}1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
MegolmEncryptedMessageData
No description available.
typescript
interface MegolmEncryptedMessageData {
encrypted: true
content: MessagePart[] // Encrypted content (base64 ciphertext in text field)
encryption_metadata: {
algorithm: 'megolm_v1'
session_id: string
message_index: number
sender_user_id: string
timestamp: number
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
Source Code Insights
File Size: 31308 characters Lines of Code: 981 Imports: 7
Usage Example
typescript
import { MegolmEncryptionStatus, MegolmEncryptedMessageData, MegolmMessageEncryptionService, megolmMessageEncryptionService } from '@/services/encryption/MegolmMessageEncryptionService'
// Example usage
// Use the exported functionality1
2
3
4
2
3
4
This documentation was automatically generated from the source code.
