Class EncryptedMedia
Inheritance
EncryptedMedia
Namespace: Uniform.Matrix.Client
Assembly: Uniform.Matrix.Client.dll
public static class EncryptedMedia
Methods
|
Edit this page
View Source
Declaration
public static Task<byte[]> DownloadEncryptedAsync(this MatrixClient client, EncryptedFile file, CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
Encrypt and upload a file as application/octet-stream; put the result in File.
Declaration
public static Task<EncryptedFile> UploadEncryptedAsync(this MatrixClient client, byte[] plaintext, CancellationToken cancellationToken = default)
Parameters
Returns
EncryptedFile file = await client.UploadEncryptedAsync(await File.ReadAllBytesAsync(path));
MessageContent content = MatrixClient.CreateFileContent(file, "cat.png", "image/png", size);