e3kit Android Java/Kotlin v0.8.0
Added
- Post-quantum keys support for peer-to-peer encryption (post-quantum group chats and double ratchet are coming later);
- New encrypted & authenticated data format including data padding & encrypted signature (authEncrypt & authDecrypt methods. Note that old decrypt is NOT able to decrypt data, encrypted by authEncrypt);
- Temporary channels - support of channels with unregistered users. Check out README for more information;
- Double Ratchet support. Check out README for more information;
EThreeParams
for easier customization ofEThree
;EThree.derivePasswords
method to derive login and backup passwords from single one.
Check out README for more info;EThreeBaseException
. AllEThree
exceptions are extended from theEThreeBaseException
from now;- You can use
"Text".toData()
orByteArray.toData()
extension functions as well asData#toBase64String()
to easily work withData
class. - Benchmarks;
Updated
- Virgil Core SDK to 7.1.0;
- Virgil Crypto to 0.12.0;
- Deprecated resetPrivateKeyBackup(password) method in favor of resetPrivateKeyBackup();
- Moved to Description in Exceptions. Please, check
Appendix A
to find out a matching between the old exceptions and the new ones. You can either find an updated info in functions docs;
Appendix A:
Kotlin
Move from the old exception structure:
try {
// Exception-throwing code
} catch (exception: WrongPasswordException) {
// Exception handling
}
To the new one:
try {
// Exception-throwing code
} catch (exception: EThreeException) {
when(exception.description) {
EThreeException.Description.WRONG_PASSWORD -> {
// Exception handling
}
}
}
Java
Move from the old exception structure:
try {
// Exception-throwing code
} catch (WrongPasswordException exception) {
// Exception handling
}
To the new one:
try {
// Exception-throwing code
} catch (EThreeException exception) {
switch (exception.description) {
case EThreeException.Description.WRONG_PASSWORD:
// Exception handling
break;
}
}
Exceptions mapping:
EThreeException:
- EThreeException(String?, Throwable?) -> EThreeException(Description, Throwable?) (EThreeException.Description.MISSING_PUBLIC_KEY)
- WrongPasswordException -> EThreeException (EThreeException.Description.WRONG_PASSWORD)
- ChangePasswordException -> EThreeException (EThreeException.Description.SAME_PASSWORD)
- UserNotRegisteredException -> EThreeException (EThreeException.Description.USER_IS_NOT_REGISTERED)
- AlreadyRegisteredException -> EThreeException (EThreeException.Description.USER_IS_ALREADY_REGISTERED)
- SignatureVerificationException -> EThreeException (EThreeException.Description.VERIFICATION_FAILED)
- ConversionException -> EThreeException (EThreeException.Description.STR_TO_DATA_FAILED)
- MissingIdentitiesException -> EThreeException (EThreeException.Description.MISSING_IDENTITIES)
KeyException:
- KeyException(String?, Throwable?) -> EThreeException(Description, Throwable?)
- PrivateKeyPresentException -> EThreeException (EThreeException.Description.PRIVATE_KEY_EXISTS)
- PrivateKeyNotFoundException -> EThreeException (EThreeException.Description.MISSING_PRIVATE_KEY)
- NoPrivateKeyBackupException -> EThreeException (EThreeException.Description.NO_PRIVATE_KEY_BACKUP)
- BackupKeyException -> EThreeException (EThreeException.Description.PRIVATE_KEY_BACKUP_EXISTS)
FindUsersException:
- FindUsersException(String?, Throwable?) -> FindUsersException(Description, Throwable?) (FindUsersException.Description.DUPLICATE_CARDS, FindUsersException.Description.MISSING_CACHED_CARD, FindUsersException.Description.CARD_WAS_NOT_FOUND)
RawGroupException:
- RawGroupException(String?, Throwable?) -> RawGroupException(Description, Throwable?) (RawGroupException.Description.EMPTY_TICKETS)
- FileGroupStorageException(String?, Throwable?) -> FileGroupStorageException(Description, Throwable?) (FileGroupStorageException.Description.INVALID_FILE_NAME, FileGroupStorageException.Description.EMPTY_FILE)
CardStorageException:
- CardStorageException(String?, Throwable?) -> SQLiteStorageException(Description, Throwable?)
- InconsistentCardStorageException -> SQLiteStorageException (SQLiteStorageException.Description.INCONSISTENT_DB)
- EmptyIdentitiesStorageException -> SQLiteStorageException (SQLiteStorageException.Description.EMPTY_IDENTITIES)
GroupException:
- GroupException(String?, Throwable?) -> GroupException(Description, Throwable?) (GroupException.Description.INVALID_GROUP)
- InvalidChangeParticipantsGroupException -> GroupException (GroupException.Description.INVALID_CHANGE_PARTICIPANTS)
- MissingCachedGroupException -> GroupException (GroupException.Description.MISSING_CACHED_GROUP)
- MessageNotFromThisGroupException -> GroupException (GroupException.Description.MESSAGE_NOT_FROM_THIS_GROUP)
- GroupIsOutdatedGroupException -> GroupException (GroupException.Description.GROUP_IS_OUTDATED)
- VerificationFailedGroupException -> GroupException (GroupException2.Description.VERIFICATION_FAILED)
- PermissionDeniedGroupException -> GroupException (GroupException.Description.GROUP_PERMISSION_DENIED)
- GroupNotFoundException -> GroupException (GroupException.Description.GROUP_WAS_NOT_FOUND)
- GroupIdTooShortException -> GroupException (GroupException.Description.SHORT_GROUP_ID)
- InvalidParticipantsCountGroupException -> GroupException (GroupException.Description.INVALID_PARTICIPANTS_COUNT)
- InconsistentStateGroupException -> GroupException (GroupException.Description.INCONSISTENT_STATE)