Skip to content

Most visited

Recently visited

navigation

KeyProperties

public abstract class KeyProperties
extends Object

java.lang.Object
   ↳ android.security.keystore.KeyProperties


Properties of Android Keystore keys.

Summary

Constants

String BLOCK_MODE_CBC

Cipher Block Chaining (CBC) block mode.

String BLOCK_MODE_CTR

Counter (CTR) block mode.

String BLOCK_MODE_ECB

Electronic Codebook (ECB) block mode.

String BLOCK_MODE_GCM

Galois/Counter Mode (GCM) block mode.

String DIGEST_MD5

MD5 digest.

String DIGEST_NONE

No digest: sign/authenticate the raw message.

String DIGEST_SHA1

SHA-1 digest.

String DIGEST_SHA224

SHA-2 224 (aka SHA-224) digest.

String DIGEST_SHA256

SHA-2 256 (aka SHA-256) digest.

String DIGEST_SHA384

SHA-2 384 (aka SHA-384) digest.

String DIGEST_SHA512

SHA-2 512 (aka SHA-512) digest.

String ENCRYPTION_PADDING_NONE

No encryption padding.

String ENCRYPTION_PADDING_PKCS7

PKCS#7 encryption padding scheme.

String ENCRYPTION_PADDING_RSA_OAEP

RSA Optimal Asymmetric Encryption Padding (OAEP) scheme.

String ENCRYPTION_PADDING_RSA_PKCS1

RSA PKCS#1 v1.5 padding scheme for encryption.

String KEY_ALGORITHM_AES

Advanced Encryption Standard (AES) key.

String KEY_ALGORITHM_EC

Elliptic Curve (EC) Cryptography key.

String KEY_ALGORITHM_HMAC_SHA1

Keyed-Hash Message Authentication Code (HMAC) key using SHA-1 as the hash.

String KEY_ALGORITHM_HMAC_SHA224

Keyed-Hash Message Authentication Code (HMAC) key using SHA-224 as the hash.

String KEY_ALGORITHM_HMAC_SHA256

Keyed-Hash Message Authentication Code (HMAC) key using SHA-256 as the hash.

String KEY_ALGORITHM_HMAC_SHA384

Keyed-Hash Message Authentication Code (HMAC) key using SHA-384 as the hash.

String KEY_ALGORITHM_HMAC_SHA512

Keyed-Hash Message Authentication Code (HMAC) key using SHA-512 as the hash.

String KEY_ALGORITHM_RSA

Rivest Shamir Adleman (RSA) key.

int ORIGIN_GENERATED

Key was generated inside AndroidKeyStore.

int ORIGIN_IMPORTED

Key was imported into AndroidKeyStore.

int ORIGIN_UNKNOWN

Origin of the key is unknown.

int PURPOSE_DECRYPT

Purpose of key: decryption.

int PURPOSE_ENCRYPT

Purpose of key: encryption.

int PURPOSE_SIGN

Purpose of key: signing or generating a Message Authentication Code (MAC).

int PURPOSE_VERIFY

Purpose of key: signature or Message Authentication Code (MAC) verification.

String SIGNATURE_PADDING_RSA_PKCS1

RSA PKCS#1 v1.5 padding for signatures.

String SIGNATURE_PADDING_RSA_PSS

RSA PKCS#1 v2.1 Probabilistic Signature Scheme (PSS) padding.

Inherited methods

From class java.lang.Object

Constants

BLOCK_MODE_CBC

added in API level 23
String BLOCK_MODE_CBC

Cipher Block Chaining (CBC) block mode.

Constant Value: "CBC"

BLOCK_MODE_CTR

added in API level 23
String BLOCK_MODE_CTR

Counter (CTR) block mode.

Constant Value: "CTR"

BLOCK_MODE_ECB

added in API level 23
String BLOCK_MODE_ECB

Electronic Codebook (ECB) block mode.

Constant Value: "ECB"

BLOCK_MODE_GCM

added in API level 23
String BLOCK_MODE_GCM

Galois/Counter Mode (GCM) block mode.

Constant Value: "GCM"

DIGEST_MD5

added in API level 23
String DIGEST_MD5

MD5 digest.

Constant Value: "MD5"

DIGEST_NONE

added in API level 23
String DIGEST_NONE

No digest: sign/authenticate the raw message.

Constant Value: "NONE"

DIGEST_SHA1

added in API level 23
String DIGEST_SHA1

SHA-1 digest.

Constant Value: "SHA-1"

DIGEST_SHA224

added in API level 23
String DIGEST_SHA224

SHA-2 224 (aka SHA-224) digest.

Constant Value: "SHA-224"

DIGEST_SHA256

added in API level 23
String DIGEST_SHA256

SHA-2 256 (aka SHA-256) digest.

Constant Value: "SHA-256"

DIGEST_SHA384

added in API level 23
String DIGEST_SHA384

SHA-2 384 (aka SHA-384) digest.

Constant Value: "SHA-384"

DIGEST_SHA512

added in API level 23
String DIGEST_SHA512

SHA-2 512 (aka SHA-512) digest.

Constant Value: "SHA-512"

ENCRYPTION_PADDING_NONE

added in API level 23
String ENCRYPTION_PADDING_NONE

No encryption padding.

Constant Value: "NoPadding"

ENCRYPTION_PADDING_PKCS7

added in API level 23
String ENCRYPTION_PADDING_PKCS7

PKCS#7 encryption padding scheme.

Constant Value: "PKCS7Padding"

ENCRYPTION_PADDING_RSA_OAEP

added in API level 23
String ENCRYPTION_PADDING_RSA_OAEP

RSA Optimal Asymmetric Encryption Padding (OAEP) scheme.

Constant Value: "OAEPPadding"

ENCRYPTION_PADDING_RSA_PKCS1

added in API level 23
String ENCRYPTION_PADDING_RSA_PKCS1

RSA PKCS#1 v1.5 padding scheme for encryption.

Constant Value: "PKCS1Padding"

KEY_ALGORITHM_AES

added in API level 23
String KEY_ALGORITHM_AES

Advanced Encryption Standard (AES) key.

Constant Value: "AES"

KEY_ALGORITHM_EC

added in API level 23
String KEY_ALGORITHM_EC

Elliptic Curve (EC) Cryptography key.

Constant Value: "EC"

KEY_ALGORITHM_HMAC_SHA1

added in API level 23
String KEY_ALGORITHM_HMAC_SHA1

Keyed-Hash Message Authentication Code (HMAC) key using SHA-1 as the hash.

Constant Value: "HmacSHA1"

KEY_ALGORITHM_HMAC_SHA224

added in API level 23
String KEY_ALGORITHM_HMAC_SHA224

Keyed-Hash Message Authentication Code (HMAC) key using SHA-224 as the hash.

Constant Value: "HmacSHA224"

KEY_ALGORITHM_HMAC_SHA256

added in API level 23
String KEY_ALGORITHM_HMAC_SHA256

Keyed-Hash Message Authentication Code (HMAC) key using SHA-256 as the hash.

Constant Value: "HmacSHA256"

KEY_ALGORITHM_HMAC_SHA384

added in API level 23
String KEY_ALGORITHM_HMAC_SHA384

Keyed-Hash Message Authentication Code (HMAC) key using SHA-384 as the hash.

Constant Value: "HmacSHA384"

KEY_ALGORITHM_HMAC_SHA512

added in API level 23
String KEY_ALGORITHM_HMAC_SHA512

Keyed-Hash Message Authentication Code (HMAC) key using SHA-512 as the hash.

Constant Value: "HmacSHA512"

KEY_ALGORITHM_RSA

added in API level 23
String KEY_ALGORITHM_RSA

Rivest Shamir Adleman (RSA) key.

Constant Value: "RSA"

ORIGIN_GENERATED

added in API level 23
int ORIGIN_GENERATED

Key was generated inside AndroidKeyStore.

Constant Value: 1 (0x00000001)

ORIGIN_IMPORTED

added in API level 23
int ORIGIN_IMPORTED

Key was imported into AndroidKeyStore.

Constant Value: 2 (0x00000002)

ORIGIN_UNKNOWN

added in API level 23
int ORIGIN_UNKNOWN

Origin of the key is unknown. This can occur only for keys backed by an old TEE-backed implementation which does not record origin information.

Constant Value: 4 (0x00000004)

PURPOSE_DECRYPT

added in API level 23
int PURPOSE_DECRYPT

Purpose of key: decryption.

Constant Value: 2 (0x00000002)

PURPOSE_ENCRYPT

added in API level 23
int PURPOSE_ENCRYPT

Purpose of key: encryption.

Constant Value: 1 (0x00000001)

PURPOSE_SIGN

added in API level 23
int PURPOSE_SIGN

Purpose of key: signing or generating a Message Authentication Code (MAC).

Constant Value: 4 (0x00000004)

PURPOSE_VERIFY

added in API level 23
int PURPOSE_VERIFY

Purpose of key: signature or Message Authentication Code (MAC) verification.

Constant Value: 8 (0x00000008)

SIGNATURE_PADDING_RSA_PKCS1

added in API level 23
String SIGNATURE_PADDING_RSA_PKCS1

RSA PKCS#1 v1.5 padding for signatures.

Constant Value: "PKCS1"

SIGNATURE_PADDING_RSA_PSS

added in API level 23
String SIGNATURE_PADDING_RSA_PSS

RSA PKCS#1 v2.1 Probabilistic Signature Scheme (PSS) padding.

Constant Value: "PSS"

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.