Class MegolmOutboundSession
Outbound Megolm session: encrypts room messages for everyone who has its session key.
Inheritance
MegolmOutboundSession
Namespace: Uniform.Matrix.Protocol.Crypto
Assembly: Uniform.Matrix.Protocol.Crypto.dll
public sealed class MegolmOutboundSession : IDisposable
Properties
|
Edit this page
View Source
Index of the next message.
Declaration
public uint MessageIndex { get; }
Property Value
|
Edit this page
View Source
Session ID: the public signing key, unpadded base64.
Declaration
public string SessionId { get; }
Property Value
|
Edit this page
View Source
The session key at the current index, signed, to share in m.room_key.
Declaration
public string SessionKey { get; }
Property Value
Methods
|
Edit this page
View Source
Create a session with a random ratchet and signing key.
Declaration
public static MegolmOutboundSession Create()
Returns
|
Edit this page
View Source
Declaration
|
Edit this page
View Source
Encrypt plaintext at the current index, then advance the ratchet.
Declaration
public string Encrypt(byte[] plaintext)
Parameters
| Type |
Name |
Description |
| byte[] |
plaintext |
|
Returns
|
Edit this page
View Source
Declaration
public string Encrypt(string plaintext)
Parameters
| Type |
Name |
Description |
| string |
plaintext |
|
Returns
|
Edit this page
View Source
Declaration
public static MegolmOutboundSession 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
Implements