AnonymousEncryptionSession
class AnonymousEncryptionSession(encryptionSession: MobileAnonymousEncryptionSession)
An anonymous encryption session, with which you can then encrypt / decrypt multiple messages or files. This should not be instantiated directly, and should be created with AnonymousSealdSDK.createAnonymousEncryptionSession.
Constructors
AnonymousEncryptionSession | constructor(encryptionSession: MobileAnonymousEncryptionSession) |
Properties
Name | Summary |
---|---|
sessionId | val sessionId: String The ID of this encryptionSession. Read-only. |
Functions
Name | Summary |
---|---|
decryptFile | fun decryptFile(encryptedFile: ByteArray): ClearFile Decrypts an encrypted file into the corresponding clear-text file. |
decryptFileAsync | suspend fun decryptFileAsync(encryptedFile: ByteArray): ClearFile Decrypts an encrypted file into the corresponding clear-text file. |
decryptFileFromURI | fun decryptFileFromURI(encryptedFileURI: String): String Decrypts an encrypted file into the corresponding clear-text file. |
decryptFileFromURIAsync | suspend fun decryptFileFromURIAsync(encryptedFileURI: String): String Decrypts an encrypted file into the corresponding clear-text file. |
decryptMessage | fun decryptMessage(encryptedMessage: String): String Decrypt an encrypted message string into the corresponding clear-text string. |
decryptMessageAsync | suspend fun decryptMessageAsync(encryptedMessage: String): String Decrypt an encrypted message string into the corresponding clear-text string. |
encryptFile | fun encryptFile(clearFile: ByteArray, filename: String): ByteArray Encrypt a clear-text file into an encrypted file, for the recipients of this session. |
encryptFileAsync | suspend fun encryptFileAsync(clearFile: ByteArray, filename: String): ByteArray Encrypt a clear-text file into an encrypted file, for the recipients of this session. |
encryptFileFromURI | fun encryptFileFromURI(clearFileURI: String): String Encrypt a clear file into an encrypted file, for the recipients of this session. |
encryptFileFromURIAsync | suspend fun encryptFileFromURIAsync(clearFileURI: String): String Encrypt a clear file into an encrypted file, for the recipients of this session. |
encryptMessage | fun encryptMessage(clearMessage: String): String Encrypt a clear-text string into an encrypted message, for the recipients of this session. |
encryptMessageAsync | suspend fun encryptMessageAsync(clearMessage: String): String Encrypt a clear-text string into an encrypted message, for the recipients of this session. |
serialize | fun serialize(): String Serialize the AnonymousEncryptionSession to a string. This is for advanced use. May be used to keep sessions in a cache. WARNING: a user could use this cache to work around being revoked. Use with caution. WARNING: if the cache is accessible to another user, they could use it to decrypt messages they are not supposed to have access to. Make sure only the current user in question can access this cache, for example by encrypting it. |