Class OlmSession
An Olm session with one other device: a double ratchet for encrypting to-device messages.
Namespace: Uniform.Matrix.Protocol.Crypto
Assembly: Uniform.Matrix.Protocol.Crypto.dll
public sealed class OlmSession : IDisposable
Properties
|
Edit this page
View Source
Session ID: SHA-256 of the identity, base and one-time keys.
Declaration
public string SessionId { get; }
Property Value
Methods
|
Edit this page
View Source
Decrypt a message of this session; throw OlmException when it does not decrypt.
Declaration
public byte[] Decrypt(OlmMessage message)
Parameters
Returns
|
Edit this page
View Source
Declaration
|
Edit this page
View Source
Encrypt plaintext: a pre-key message until the other side has answered.
Declaration
public OlmMessage Encrypt(byte[] plaintext)
Parameters
| Type |
Name |
Description |
| byte[] |
plaintext |
|
Returns
|
Edit this page
View Source
Declaration
public OlmMessage Encrypt(string plaintext)
Parameters
| Type |
Name |
Description |
| string |
plaintext |
|
Returns
|
Edit this page
View Source
Declaration
public static OlmSession FromPickle(string pickle, ReadOnlySpan<byte> key)
Parameters
Returns
|
Edit this page
View Source
Pickle the session in vodozemac's format, encrypted with 32-byte key.
Declaration
public string Pickle(ReadOnlySpan<byte> key)
Parameters
Returns
|
Edit this page
View Source
Return the ID of the session a pre-key message would create or continue.
Declaration
public static string PreKeySessionId(string preKeyCiphertext)
Parameters
| Type |
Name |
Description |
| string |
preKeyCiphertext |
|
Returns
Implements