EncryptedFileInfo

@JsonClass(generateAdapter = true)
data class EncryptedFileInfo(    @Json(name = "url") val url: String? = null,     @Json(name = "key") val key: EncryptedFileKey? = null,     @Json(name = "iv") val iv: String? = null,     @Json(name = "hashes") val hashes: Map<String, String>? = null,     @Json(name = "v") val v: String? = null)

In Matrix specs: EncryptedFile.

Constructors

Link copied to clipboard
fun EncryptedFileInfo(    @Json(name = "url") url: String? = null,     @Json(name = "key") key: EncryptedFileKey? = null,     @Json(name = "iv") iv: String? = null,     @Json(name = "hashes") hashes: Map<String, String>? = null,     @Json(name = "v") v: String? = null)

Functions

Link copied to clipboard
fun isValid(): Boolean

Check what the spec tells us.

Properties

Link copied to clipboard
val hashes: Map<String, String>? = null

Required. A map from an algorithm name to a hash of the ciphertext, encoded as unpadded base64. Clients should support the SHA-256 hash, which uses the key "sha256".

Link copied to clipboard
val iv: String? = null

Required. The Initialisation Vector used by AES-CTR, encoded as unpadded base64.

Link copied to clipboard
val key: EncryptedFileKey? = null

Required. A JSON Web Key object.

Link copied to clipboard
val url: String? = null

Required. The URL to the file.

Link copied to clipboard
val v: String? = null

Required. Version of the encrypted attachments protocol. Must be "v2".

Extensions

Link copied to clipboard
fun EncryptedFileInfo.toElementToDecrypt(): ElementToDecrypt?