ethree-enclave / com.virgilsecurity.android.ethreeenclave.interaction / EThree

EThree

class EThree : EThreeCore

EThree class simplifies work with Virgil Services to easily implement End to End Encrypted communication.

Constructors

<init>

EThree(params: EThreeParams)
EThree(params: EThreeParams)
EThree(identity: String, tokenCallback: () -> String, context: Context, alias: String = "VirgilAndroidKeyStorage", isAuthenticationRequired: Boolean = true, keyValidityDuration: Int = 60 * 5, keyChangedCallback: OnKeyChangedCallback? = null, keyPairType: KeyPairType = Defaults.keyPairType, enableRatchet: Boolean = Defaults.enableRatchet, keyRotationInterval: TimeSpan = Defaults.keyRotationInterval)EThree(identity: String, tokenCallback: OnGetTokenCallback, context: Context, alias: String = "VirgilAndroidKeyStorage", isAuthenticationRequired: Boolean = true, keyValidityDuration: Int = 60 * 5, keyChangedCallback: OnKeyChangedCallback? = null, keyPairType: KeyPairType = Defaults.keyPairType, enableRatchet: Boolean = Defaults.enableRatchet, keyRotationInterval: TimeSpan = Defaults.keyRotationInterval)

EThree class simplifies work with Virgil Services to easily implement End to End Encrypted communication.

Properties

keyStorage

val keyStorage: KeyStorage

Companion Object Functions

derivePasswords

fun derivePasswords(password: String): DerivedPasswords

initialize

fun initialize(context: Context, onGetTokenCallback: OnGetTokenCallback, alias: String = "VirgilAndroidKeyStorage", isAuthenticationRequired: Boolean = true, keyValidityDuration: Int = 60 * 5, keyChangedCallback: OnKeyChangedCallback? = null): Result<EThree>

Current method allows you to initialize EThree helper class. To do this you should provide onGetTokenCallback that must return Json Web Token string representation with identity of the user which will use this class. In onResultListener you will receive instance of EThreeCore class or an Throwable if something went wrong.