encryption/SignalProtocolService Service
File: src/services/encryption/SignalProtocolService.ts
Overview
Exports
- KeyPair - interface export
- PreKey - interface export
- SignedPreKey - interface export
- PreKeyBundleData - interface export
- EncryptedMessage - interface export
- SignalProtocolService - class export
- signalProtocolService - const export
Classes
SignalProtocolService
No description available.
Methods:
constructorgetInstanceinitializeisInitializedensureInitializedgenerateIdentityKeyPairgenerateSignedPreKeygeneratePreKeysgenerateRegistrationIdprocessPreKeyBundlecreateSessionFromPreKeyBundlekeyhasSessionencryptMessagedecryptMessagecatchencodeToBase64decodeFromBase64stringToArrayBufferarrayBufferToStringbinaryStringToArrayBufferencryptGroupMessagedecryptGroupMessage
Properties:
instancekeyStoreinitializedstoretruenullGENERATIONpairkeyPairKeyprekeyidentityKeyPairsignedPreKeyIdidentityPrivateKeysignedPreKeypubKeyidsignaturetimestampprekeyscountpreKeysipreKeyIDMANAGEMENTrecipientAddressbundleaddresssessionBuilderlibraryregistrationIdidentityKeykeyIdundefinedrecipientsessionRecordDECRYPTIONplaintextsessionCipherciphertextbodyBufferbodytypesendersenderAddressencryptedMessageSignalProtocolmessageBodyerrorMETHODSbytesbinarydataencoderdecoderbuffer0xff1messageNoteperformancegroupIdsenderIddistributionencryptedBodyplaceholder
Interfaces
KeyPair
No description available.
typescript
interface KeyPair {
publicKey: string // Base64 encoded
privateKey: string // Base64 encoded
}PreKey
No description available.
typescript
interface PreKey {
id: number
keyPair: KeyPair
}SignedPreKey
No description available.
typescript
interface SignedPreKey {
signature: string // Base64 encoded
timestamp: number
}PreKeyBundleData
No description available.
typescript
interface PreKeyBundleData {
identityKey: string // Base64 encoded public key
registrationId: number
deviceId: number
signedPreKey: {
id: number
publicKey: string
signature: string
}
oneTimePreKey?: {
id: number
publicKey: string
}
}EncryptedMessage
No description available.
typescript
interface EncryptedMessage {
type: 'prekey' | 'message'
body: string // Base64 encoded ciphertext
registrationId: number
}Source Code Insights
File Size: 12213 characters Lines of Code: 401 Imports: 3
Usage Example
typescript
import { KeyPair, PreKey, SignedPreKey, PreKeyBundleData, EncryptedMessage, SignalProtocolService, signalProtocolService } from '@/services/encryption/SignalProtocolService'
// Example usage
// Use the exported functionalityThis documentation was automatically generated from the source code.
