Skip to content
This repository was archived by the owner on Aug 5, 2021. It is now read-only.
Lilia edited this page Jun 7, 2016 · 14 revisions

SignalProtocolAddress

new SignalProtocolAddress(number, deviceId)

Constructs a new SignalProtocolAddress.

Parameter Type Description
number String The storage interface.
deviceId Number Remote address

SignalProtocolAddress.getName()

Parameter Type Description
@returns String

SignalProtocolAddress.getDeviceId()

Parameter Type Description
@returns Number

SignalProtocolAddress.toString()

Convert the address into it's string form.

Parameter Type Description
@returns String

SignalProtocolAddress.equals(signalProtocolAddress)

Compares one address to another.

Parameter Type Description
@returns boolean

SessionBuilder

new SessionBuilder(store, address)

Constructs a new SessionBuilder.

Parameter Type Description
store SignalProtocolStore The storage interface.
address SignalProtocolAddress Remote address

SessionBuilder.processPreKey(preKeyBundle)

Create a new session from a PreKey bundle returned by the server.

Parameter Type Description
preKeyBundle Object
@returns Promise

SessionBuilder.processV3(record, preKeyWhisperMessage)

Construct a new session from a preKeyWhisperMessage. Modifies the given record object but does not save the change to the store.

Parameter Type Description
record SessionRecord
preKeyWhisperMessage Object

SessionCipher

new SessionCipher(store=, address=)

Constructs a new SessionCipher.

Parameter Type Description
store SignalProtocolStore The storage interface.
address SignalProtocolAddress Remote address

SessionCipher.encrypt(message, encoding=)

Encrypt a message to the cipher's address.

| Parameter | Type | Description |-----------------|-----------------| | message | !Array.<(!ByteBuffer | !ArrayBuffer | !Uint8Array | string)> | Buffers to concatenate | encoding | string | boolean | String encoding if buffers contains a string ("base64", "hex", "binary", defaults to "utf8")

SessionCipher.decryptWhisperMessage(message, encoding=)

Decrypt a normal message.

| Parameter | Type | Description |-----------------|-----------------| | message | !ByteBuffer | !ArrayBuffer | !Uint8Array | string)> |
| encoding | string | boolean | String encoding if message contains a string ("base64", "hex", "binary", defaults to "utf8")


SessionCipher.decryptPreKeyWhisperMessage(message, encoding=)

Decrypt a PreKey message.

| Parameter | Type | Description |-----------------|-----------------| | message | !ByteBuffer | !ArrayBuffer | !Uint8Array | string)> | | encoding | string | boolean | String encoding if buffers contains a string ("base64", "hex", "binary", defaults to "utf8")


Clone this wiki locally