Class EncryptionSession
-
- All Implemented Interfaces:
public final class EncryptionSessionAn 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.
-
-
Constructor Summary
Constructors Constructor Description EncryptionSession(MobileEncryptionSession encryptionSession)
-
Method Summary
Modifier and Type Method Description final StringgetSessionId()final Map<String, ActionStatus>addRecipients(Array<String> recipients)Add new recipients to this session. final Map<String, ActionStatus>addRecipientsAsync(Array<String> recipients)Add new recipients to this session. final Map<String, ActionStatus>revokeRecipients(Array<String> recipients)Revoke some recipients from this session. final Map<String, ActionStatus>revokeRecipientsAsync(Array<String> recipients)Revoke some recipients from this session. final Map<String, ActionStatus>revokeAll()Revoke this session entirely. final Map<String, ActionStatus>revokeAllAsync()Revoke this session entirely. final Map<String, ActionStatus>revokeOthers()Revoke all recipients besides yourself from this session. final Map<String, ActionStatus>revokeOthersAsync()Revoke all recipients besides yourself from this session. final StringencryptMessage(String clearMessage)Encrypt a clear-text string into an encrypted message, for the recipients of this session. final StringencryptMessageAsync(String clearMessage)Encrypt a clear-text string into an encrypted message, for the recipients of this session. final StringdecryptMessage(String encryptedMessage)Decrypt an encrypted message string into the corresponding clear-text string. final StringdecryptMessageAsync(String encryptedMessage)Decrypt an encrypted message string into the corresponding clear-text string. final ByteArrayencryptFile(ByteArray clearFile, String filename)Encrypt a clear-text file into an encrypted file, for the recipients of this session. final ByteArrayencryptFileAsync(ByteArray clearFile, String filename)Encrypt a clear-text file into an encrypted file, for the recipients of this session. final ClearFiledecryptFile(ByteArray encryptedFile)Decrypts an encrypted file into the corresponding clear-text file. final ClearFiledecryptFileAsync(ByteArray encryptedFile)Decrypts an encrypted file into the corresponding clear-text file. final StringencryptFileFromURI(String clearFileURI)Encrypt a clear file into an encrypted file, for the recipients of this session. final StringencryptFileFromURIAsync(String clearFileURI)Encrypt a clear file into an encrypted file, for the recipients of this session. final StringdecryptFileFromURI(String encryptedFileURI)Decrypts an encrypted file into the corresponding clear-text file. final StringdecryptFileFromURIAsync(String encryptedFileURI)Decrypts an encrypted file into the corresponding clear-text file. -
-
Method Detail
-
getSessionId
final String getSessionId()
-
addRecipients
final Map<String, ActionStatus> addRecipients(Array<String> recipients)
Add new recipients to this session. These recipients will be able to read all encrypted messages of this session.
- Parameters:
recipients- The Seald IDs of users to add to this session.
-
addRecipientsAsync
final Map<String, ActionStatus> addRecipientsAsync(Array<String> recipients)
Add new recipients to this session. These recipients will be able to read all encrypted messages of this session.
- Parameters:
recipients- The Seald IDs of users to add to this session.
-
revokeRecipients
final Map<String, ActionStatus> revokeRecipients(Array<String> recipients)
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.
- Parameters:
recipients- The Seald IDs of users to revoke from this session.
-
revokeRecipientsAsync
final Map<String, ActionStatus> revokeRecipientsAsync(Array<String> recipients)
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.
- Parameters:
recipients- The Seald IDs of users to revoke from this session.
-
revokeAll
final Map<String, ActionStatus> revokeAll()
Revoke this session entirely.
-
revokeAllAsync
final Map<String, ActionStatus> revokeAllAsync()
Revoke this session entirely.
-
revokeOthers
final Map<String, ActionStatus> revokeOthers()
Revoke all recipients besides yourself from this session.
-
revokeOthersAsync
final Map<String, ActionStatus> revokeOthersAsync()
Revoke all recipients besides yourself from this session.
-
encryptMessage
final String encryptMessage(String clearMessage)
Encrypt a clear-text string into an encrypted message, for the recipients of this session.
- Parameters:
clearMessage- The message to encrypt.
-
encryptMessageAsync
final String encryptMessageAsync(String clearMessage)
Encrypt a clear-text string into an encrypted message, for the recipients of this session.
- Parameters:
clearMessage- The message to encrypt.
-
decryptMessage
final String decryptMessage(String encryptedMessage)
Decrypt an encrypted message string into the corresponding clear-text string.
- Parameters:
encryptedMessage- The encrypted message to decrypt.
-
decryptMessageAsync
final String decryptMessageAsync(String encryptedMessage)
Decrypt an encrypted message string into the corresponding clear-text string.
- Parameters:
encryptedMessage- The encrypted message to decrypt.
-
encryptFile
final ByteArray encryptFile(ByteArray clearFile, String filename)
Encrypt a clear-text file into an encrypted file, for the recipients of this session.
- Parameters:
clearFile- A ByteArray of the clear-text content of the file to encrypt.filename- The name of the file to encrypt.
-
encryptFileAsync
final ByteArray encryptFileAsync(ByteArray clearFile, String filename)
Encrypt a clear-text file into an encrypted file, for the recipients of this session.
- Parameters:
clearFile- A ByteArray of the clear-text content of the file to encrypt.filename- The name of the file to encrypt.
-
decryptFile
final ClearFile decryptFile(ByteArray encryptedFile)
Decrypts an encrypted file into the corresponding clear-text file.
- Parameters:
encryptedFile- A ByteArray of the content of the encrypted file to decrypt.
-
decryptFileAsync
final ClearFile decryptFileAsync(ByteArray encryptedFile)
Decrypts an encrypted file into the corresponding clear-text file.
- Parameters:
encryptedFile- A ByteArray of the content of the encrypted file to decrypt.
-
encryptFileFromURI
final String encryptFileFromURI(String clearFileURI)
Encrypt a clear file into an encrypted file, for the recipients of this session.
- Parameters:
clearFileURI- A String URI of the file to encrypt.
-
encryptFileFromURIAsync
final String encryptFileFromURIAsync(String clearFileURI)
Encrypt a clear file into an encrypted file, for the recipients of this session.
- Parameters:
clearFileURI- A String URI of the file to encrypt.
-
decryptFileFromURI
final String decryptFileFromURI(String encryptedFileURI)
Decrypts an encrypted file into the corresponding clear-text file.
- Parameters:
encryptedFileURI- A String URI of the encrypted file to decrypt.
-
decryptFileFromURIAsync
final String decryptFileFromURIAsync(String encryptedFileURI)
Decrypts an encrypted file into the corresponding clear-text file.
- Parameters:
encryptedFileURI- A String URI of the encrypted file to decrypt.
-
-
-
-