Home
last modified time | relevance | path

Searched refs:WrappedKey (Results 1 – 10 of 10) sorted by relevance

/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DWrappedKeyTest.java74 WrappedKey wrappedKey = WrappedKey.fromSecretKey(wrappingKey, rawKey, NULL_METADATA); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata()
93 WrappedKey wrappedKey = WrappedKey.fromSecretKey(wrappingKey, rawKey, NON_NULL_METADATA); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata()
111 WrappedKey wrappedKey = WrappedKey.fromSecretKey(wrappingKey, rawKey, NULL_METADATA); in fromSecretKey_returnsAKeyWithTheGenerationIdOfTheWrappingKey()
121 WrappedKey wrappedKey = WrappedKey.fromSecretKey( in decryptWrappedKeys_decryptsWrappedKeys_nullMetadata()
123 HashMap<String, WrappedKey> keysByAlias = new HashMap<>(); in decryptWrappedKeys_decryptsWrappedKeys_nullMetadata()
126 Map<String, Pair<SecretKey, byte[]>> unwrappedKeys = WrappedKey.unwrapKeys( in decryptWrappedKeys_decryptsWrappedKeys_nullMetadata()
140 WrappedKey wrappedKey = WrappedKey.fromSecretKey( in decryptWrappedKeys_decryptsWrappedKeys_nonNullMetadata()
142 HashMap<String, WrappedKey> keysByAlias = new HashMap<>(); in decryptWrappedKeys_decryptsWrappedKeys_nonNullMetadata()
145 Map<String, Pair<SecretKey, byte[]>> unwrappedKeys = WrappedKey.unwrapKeys( in decryptWrappedKeys_decryptsWrappedKeys_nonNullMetadata()
159 WrappedKey wrappedKey = WrappedKey.fromSecretKey( in decryptWrappedKeys_doesNotDieIfSomeKeysAreUnwrappable()
[all …]
DRecoverableKeyGeneratorTest.java101 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in generateAndStoreKey_storesWrappedKey_nullMetadata()
111 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in generateAndStoreKey_storesWrappedKey_nonNullMetadata()
129 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial()
163 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in importKey_storesTheWrappedVersionOfTheRawMaterial()
DKeySyncTaskTest.java250 WrappedKey.fromSecretKey(mEncryptKey, applicationKey, TEST_APP_KEY_METADATA_NULL)); in run_doesNotSendAnythingIfNoRecoveryAgentSet()
266 WrappedKey.fromSecretKey(mEncryptKey, applicationKey, TEST_APP_KEY_METADATA_NULL)); in run_doesNotSendAnythingIfNoDeviceIdIsSet()
919 WrappedKey.fromSecretKey(mEncryptKey, applicationKey, metadata)); in addApplicationKey()
DRecoverableKeyStoreManagerTest.java1273 WrappedKey wrappedKey = new WrappedKey(NONCE, KEY_MATERIAL, keyMetadata, GENERATION_ID, in setRecoveryStatus()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/
DRecoverableKeyStoreDbTest.java34 import com.android.server.locksettings.recoverablekeystore.WrappedKey;
89 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId); in insertKey_replacesOldKey()
92 WrappedKey retrievedKey = mRecoverableKeyStoreDb.getKey(uid, alias); in insertKey_replacesOldKey()
102 wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId); in insertKey_replacesOldKey()
116 WrappedKey key1 = new WrappedKey( in insertKey_allowsTwoUidsToHaveSameAlias()
121 WrappedKey key2 = new WrappedKey( in insertKey_allowsTwoUidsToHaveSameAlias()
143 WrappedKey key = new WrappedKey( in removeKey_removesAKey()
157 WrappedKey key = mRecoverableKeyStoreDb.getKey( in getKey_returnsNullIfNoKey()
174 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId, 120); in getKey_returnsInsertedKey()
177 WrappedKey retrievedKey = mRecoverableKeyStoreDb.getKey(uid, alias); in getKey_returnsInsertedKey()
[all …]
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
DWrappedKey.java43 public class WrappedKey { class
64 public static WrappedKey fromSecretKey(PlatformEncryptionKey wrappingKey, SecretKey key, in fromSecretKey()
100 return new WrappedKey( in fromSecretKey()
118 public WrappedKey(byte[] nonce, byte[] keyMaterial, @Nullable byte[] keyMetadata, in WrappedKey() method in WrappedKey
136 public WrappedKey(byte[] nonce, byte[] keyMaterial, @Nullable byte[] keyMetadata, in WrappedKey() method in WrappedKey
202 Map<String, WrappedKey> wrappedKeys) in unwrapKeys()
210 WrappedKey wrappedKey = wrappedKeys.get(alias); in unwrapKeys()
DRecoverableKeyGenerator.java104 WrappedKey wrappedKey = WrappedKey.fromSecretKey(platformKey, key, metadata); in generateAndStoreKey()
148 WrappedKey wrappedKey = WrappedKey.fromSecretKey(platformKey, key, metadata); in importKey()
DKeySyncTask.java436 Map<String, WrappedKey> wrappedKeys = mRecoverableKeyStoreDb.getAllKeys( in getKeysToSync()
438 return WrappedKey.unwrapKeys(decryptKey, wrappedKeys); in getKeysToSync()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/
DCleanupManager.java26 import com.android.server.locksettings.recoverablekeystore.WrappedKey;
163 Map<String, WrappedKey> allKeys = mDatabase.getAllKeys(userId, uid, generationId); in removeAllKeysForRecoveryAgent()
DRecoverableKeyStoreDb.java31 import com.android.server.locksettings.recoverablekeystore.WrappedKey;
97 public long insertKey(int userId, int uid, String alias, WrappedKey wrappedKey) { in insertKey()
122 @Nullable public WrappedKey getKey(int uid, String alias) { in getKey()
176 return new WrappedKey(nonce, keyMaterial, keyMetadata, generationId, recoveryStatus); in getKey()
265 public @NonNull Map<String, WrappedKey> getAllKeys(int userId, int recoveryAgentUid, in getAllKeys()
295 HashMap<String, WrappedKey> keys = new HashMap<>(); in getAllKeys()
315 keys.put(alias, new WrappedKey(nonce, keyMaterial, keyMetadata, in getAllKeys()