Skip to content
Sur cette page

EncryptionSession

class EncryptionSession(encryptionSession: MobileEncryptionSession)

An encryption session, with which you can then encrypt / decrypt multiple messages or files. This should not be instantiated directly, and should be either created with SealdSDK.createEncryptionSession, or retrieved with SealdSDK.retrieveEncryptionSession or SealdSDK.retrieveEncryptionSessionFromMessage.

Constructors

EncryptionSessionconstructor(encryptionSession: MobileEncryptionSession)

Properties

NameSummary
sessionIdval sessionId: String
The ID of this encryptionSession. Read-only.

Functions

NameSummary
addRecipientsfun addRecipients(recipients: Array<String>): Map<String, ActionStatus>
Add new recipients to this session. These recipients will be able to read all encrypted messages of this session.
addRecipientsAsyncsuspend fun addRecipientsAsync(recipients: Array<String>): Map<String, ActionStatus>
Add new recipients to this session. These recipients will be able to read all encrypted messages of this session.
decryptFilefun decryptFile(encryptedFile: ByteArray): ClearFile
Decrypts an encrypted file into the corresponding clear-text file.
decryptFileAsyncsuspend fun decryptFileAsync(encryptedFile: ByteArray): ClearFile
Decrypts an encrypted file into the corresponding clear-text file.
decryptFileFromURIfun decryptFileFromURI(encryptedFileURI: String): String
Decrypts an encrypted file into the corresponding clear-text file.
decryptFileFromURIAsyncsuspend fun decryptFileFromURIAsync(encryptedFileURI: String): String
Decrypts an encrypted file into the corresponding clear-text file.
decryptMessagefun decryptMessage(encryptedMessage: String): String
Decrypt an encrypted message string into the corresponding clear-text string.
decryptMessageAsyncsuspend fun decryptMessageAsync(encryptedMessage: String): String
Decrypt an encrypted message string into the corresponding clear-text string.
encryptFilefun encryptFile(clearFile: ByteArray, filename: String): ByteArray
Encrypt a clear-text file into an encrypted file, for the recipients of this session.
encryptFileAsyncsuspend fun encryptFileAsync(clearFile: ByteArray, filename: String): ByteArray
Encrypt a clear-text file into an encrypted file, for the recipients of this session.
encryptFileFromURIfun encryptFileFromURI(clearFileURI: String): String
Encrypt a clear file into an encrypted file, for the recipients of this session.
encryptFileFromURIAsyncsuspend fun encryptFileFromURIAsync(clearFileURI: String): String
Encrypt a clear file into an encrypted file, for the recipients of this session.
encryptMessagefun encryptMessage(clearMessage: String): String
Encrypt a clear-text string into an encrypted message, for the recipients of this session.
encryptMessageAsyncsuspend fun encryptMessageAsync(clearMessage: String): String
Encrypt a clear-text string into an encrypted message, for the recipients of this session.
revokeAllfun revokeAll(): Map<String, ActionStatus>
Revoke this session entirely.
revokeAllAsyncsuspend fun revokeAllAsync(): Map<String, ActionStatus>
Revoke this session entirely.
revokeOthersfun revokeOthers(): Map<String, ActionStatus>
Revoke all recipients besides yourself from this session.
revokeOthersAsyncsuspend fun revokeOthersAsync(): Map<String, ActionStatus>
Revoke all recipients besides yourself from this session.
revokeRecipientsfun revokeRecipients(recipients: Array<String>): Map<String, ActionStatus>
Revoke some recipients from this session. If you want to revoke all recipients, see revokeAll instead. If you want to revoke all recipients besides yourself, see revokeOthers.
revokeRecipientsAsyncsuspend fun revokeRecipientsAsync(recipients: Array<String>): Map<String, ActionStatus>
Revoke some recipients from this session. If you want to revoke all recipients, see revokeAll instead. If you want to revoke all recipients besides yourself, see revokeOthers.