public static class EosioAndroidKeyStoreUtility.Companion
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAllKeys(java.security.KeyStore.LoadStoreParameter loadStoreParameter)
Delete all keys in the Android KeyStore
|
boolean |
deleteKeyByAlias(java.lang.String keyAliasToDelete,
java.security.KeyStore.LoadStoreParameter loadStoreParameter)
Delete a key inside Android KeyStore by its alias
|
java.lang.String |
generateAndroidKeyStoreKey(android.security.keystore.KeyGenParameterSpec keyGenParameterSpec)
Generate a new key inside Android KeyStore by the given
keyGenParameterSpec and return the new key in EOS format |
java.lang.String |
generateAndroidKeyStoreKey(java.lang.String alias)
Generate a new key inside AndroidKeyStore by the given
alias and return the new key in EOS format |
java.util.List<kotlin.Pair> |
getAllAndroidKeyStoreKeysInEOSFormat(java.security.KeyStore.ProtectionParameter password,
java.security.KeyStore.LoadStoreParameter loadStoreParameter)
Get all (SECP256R1) curve keys in EOS format from Android KeyStore
|
java.lang.String |
getAndroidKeyStoreKeyInEOSFormat(java.lang.String alias,
java.security.KeyStore.ProtectionParameter password,
java.security.KeyStore.LoadStoreParameter loadStoreParameter)
Get all (SECP256R1) keys in EOS format from Android KeyStore
|
kotlin.Array[] |
sign(kotlin.Array[] data,
java.lang.String alias,
java.security.KeyStore.ProtectionParameter password,
java.security.KeyStore.LoadStoreParameter loadStoreParameter)
Sign data with a key in the KeyStore.
|
@JvmStatic
@NotNull
public java.lang.String generateAndroidKeyStoreKey(@NotNull
android.security.keystore.KeyGenParameterSpec keyGenParameterSpec)
Generate a new key inside Android KeyStore by the given keyGenParameterSpec and return the new key in EOS format
The given keyGenParameterSpec is the parameter specification to generate a new key. This specification
must include the following information if the key to be generated needs to be EOS Mainnet compliant:
KeyGenParameterSpec must include KeyProperties.PURPOSE_SIGN
KeyGenParameterSpec.getAlgorithmParameterSpec must be of type ECGenParameterSpec
KeyGenParameterSpec.getAlgorithmParameterSpec's curve name must be SECP256R1_CURVE_NAME
@JvmStatic
@NotNull
public java.lang.String generateAndroidKeyStoreKey(@NotNull
java.lang.String alias)
Generate a new key inside AndroidKeyStore by the given alias and return the new key in EOS format
The given alias is the identity of the key. The new key will be generated with the Default KeyGenParameterSpec from the generateDefaultKeyGenParameterSpecBuilder
alias,
alias,
KeyGenParameterSpec@JvmStatic
@NotNull
public java.util.List<kotlin.Pair> getAllAndroidKeyStoreKeysInEOSFormat(@Nullable
java.security.KeyStore.ProtectionParameter password,
@Nullable
java.security.KeyStore.LoadStoreParameter loadStoreParameter)
Get all (SECP256R1) curve keys in EOS format from Android KeyStore
password - KeyStore.ProtectionParameter? - the password to load all the keysloadStoreParameter - KeyStore.LoadStoreParameter? - the KeyStore Parameter to load the KeyStore instance@JvmStatic
@NotNull
public java.lang.String getAndroidKeyStoreKeyInEOSFormat(@NotNull
java.lang.String alias,
@Nullable
java.security.KeyStore.ProtectionParameter password,
@Nullable
java.security.KeyStore.LoadStoreParameter loadStoreParameter)
Get all (SECP256R1) keys in EOS format from Android KeyStore
alias - String - the key's identitypassword - KeyStore.ProtectionParameter? - the password to load all the keysloadStoreParameter - KeyStore.LoadStoreParameter? - the KeyStore Parameter to load the KeyStore instance@JvmStatic
@Nullable
public kotlin.Array[] sign(@NotNull
kotlin.Array[] data,
@NotNull
java.lang.String alias,
@Nullable
java.security.KeyStore.ProtectionParameter password,
@Nullable
java.security.KeyStore.LoadStoreParameter loadStoreParameter)
Sign data with a key in the KeyStore.
data - ByteArray - data to be signedalias - String - identity of the key to be used for signingpassword - KeyStore.ProtectionParameter - password of the keyAndroidKeyStoreSigningError@JvmStatic
public boolean deleteKeyByAlias(@NotNull
java.lang.String keyAliasToDelete,
@Nullable
java.security.KeyStore.LoadStoreParameter loadStoreParameter)
Delete a key inside Android KeyStore by its alias
keyAliasToDelete - String - the alias of the key to deleteloadStoreParameter - KeyStore.LoadStoreParameter? - the KeyStore Parameter to load the KeyStore instanceAndroidKeyStoreDeleteError@JvmStatic
public void deleteAllKeys(@Nullable
java.security.KeyStore.LoadStoreParameter loadStoreParameter)
Delete all keys in the Android KeyStore
loadStoreParameter - KeyStore.LoadStoreParameter? - the KeyStore Parameter to load the KeyStore instance