Home
last modified time | relevance | path

Searched refs:keyMaterial (Results 1 – 7 of 7) sorted by relevance

/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/
DRecoverableKeyStoreDbTest.java86 byte[] keyMaterial = getUtf8Bytes("keymaterial1"); in insertKey_replacesOldKey()
89 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId); in insertKey_replacesOldKey()
94 assertArrayEquals(keyMaterial, retrievedKey.getKeyMaterial()); in insertKey_replacesOldKey()
99 keyMaterial = getUtf8Bytes("keymaterial2"); in insertKey_replacesOldKey()
102 wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId); in insertKey_replacesOldKey()
107 assertArrayEquals(keyMaterial, retrievedKey.getKeyMaterial()); in insertKey_replacesOldKey()
171 byte[] keyMaterial = getUtf8Bytes("keymaterial"); in getKey_returnsInsertedKey()
174 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId, 120); in getKey_returnsInsertedKey()
180 assertArrayEquals(keyMaterial, retrievedKey.getKeyMaterial()); in getKey_returnsInsertedKey()
379 byte[] keyMaterial = getUtf8Bytes("keymaterial"); in setPlatformKeyGenerationId_invalidatesExistingKeysForUser()
[all …]
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
DWrappedKey.java118 public WrappedKey(byte[] nonce, byte[] keyMaterial, @Nullable byte[] keyMetadata, in WrappedKey() argument
120 this(nonce, keyMaterial, keyMetadata, platformKeyGenerationId, in WrappedKey()
136 public WrappedKey(byte[] nonce, byte[] keyMaterial, @Nullable byte[] keyMetadata, in WrappedKey() argument
139 mKeyMaterial = keyMaterial; in WrappedKey()
DRecoverableKeyStoreManager.java914 byte[] keyMaterial = KeySyncUtils.decryptApplicationKey(recoveryKey, in recoverApplicationKeys()
916 keyMaterialByAlias.put(alias, keyMaterial); in recoverApplicationKeys()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DKeySyncUtilsTest.java133 byte[] keyMaterial = KeySyncUtils.decryptApplicationKey(recoveryKey.getEncoded(), in decryptApplicationKey_decryptsAnApplicationKey_nullMetadata()
136 assertArrayEquals(applicationKey.getEncoded(), keyMaterial); in decryptApplicationKey_decryptsAnApplicationKey_nullMetadata() local
150 byte[] keyMaterial = KeySyncUtils.decryptApplicationKey(recoveryKey.getEncoded(), in decryptApplicationKey_decryptsAnApplicationKey_nonNullMetadata()
153 assertArrayEquals(applicationKey.getEncoded(), keyMaterial); in decryptApplicationKey_decryptsAnApplicationKey_nonNullMetadata() local
222 byte[] keyMaterial = KeySyncUtils.decryptRecoveryKey(LOCK_SCREEN_HASH_1, encrypted); in decryptRecoveryKey_decryptsALocallyEncryptedKey()
224 assertArrayEquals(recoveryKey.getEncoded(), keyMaterial); in decryptRecoveryKey_decryptsALocallyEncryptedKey() local
DRecoverableKeyStoreManagerTest.java242 byte[] keyMaterial = randomBytes(APPLICATION_KEY_SIZE_BYTES); in importKey_storesTheKey()
244 mRecoverableKeyStoreManager.importKey(TEST_ALIAS, keyMaterial); in importKey_storesTheKey()
252 byte[] keyMaterial = randomBytes(APPLICATION_KEY_SIZE_BYTES - 1); in importKey_throwsIfInvalidLength()
254 mRecoverableKeyStoreManager.importKey(TEST_ALIAS, keyMaterial); in importKey_throwsIfInvalidLength()
275 byte[] keyMaterial = randomBytes(APPLICATION_KEY_SIZE_BYTES); in importKeyWithMetadata_nullMetadata_storesTheKey()
278 TEST_ALIAS, keyMaterial, KEY_METADATA_NULL); in importKeyWithMetadata_nullMetadata_storesTheKey()
288 byte[] keyMaterial = randomBytes(APPLICATION_KEY_SIZE_BYTES); in importKeyWithMetadata_nonNullMetadata_storesTheKey()
291 TEST_ALIAS, keyMaterial, KEY_METADATA_NON_NULL); in importKeyWithMetadata_nonNullMetadata_storesTheKey()
299 byte[] keyMaterial = randomBytes(APPLICATION_KEY_SIZE_BYTES - 1); in importKeyWithMetadata_throwsIfInvalidLength()
302 TEST_ALIAS, keyMaterial, KEY_METADATA_NON_NULL); in importKeyWithMetadata_throwsIfInvalidLength()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/
DRecoverableKeyStoreDb.java160 byte[] keyMaterial = cursor.getBlob( in getKey()
176 return new WrappedKey(nonce, keyMaterial, keyMetadata, generationId, recoveryStatus); in getKey()
299 byte[] keyMaterial = cursor.getBlob( in getAllKeys()
315 keys.put(alias, new WrappedKey(nonce, keyMaterial, keyMetadata, in getAllKeys()
/frameworks/base/keystore/java/android/security/keystore2/
DAndroidKeyStoreSpi.java734 byte[] keyMaterial = key.getEncoded(); in setSecretKeyEntry()
735 if (keyMaterial == null) { in setSecretKeyEntry()
908 importArgs, flags, keyMaterial); in setSecretKeyEntry()