Loading services/core/java/com/android/server/locksettings/recoverablekeystore/KeySyncUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -300,7 +300,7 @@ public class KeySyncUtils { .put(SecureBox.encodePublicKey(thmPublicKey)) .putLong(counterId) .putInt(maxAttempts) .put(new byte[VAULT_HANDLE_LENGTH_BYTES]) // TODO: replace with real vaultHandle .put(vaultHandle) .array(); } Loading services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ public class KeySyncTaskTest { private static final int TEST_RECOVERY_AGENT_UID = 10009; private static final int TEST_RECOVERY_AGENT_UID2 = 10010; private static final byte[] TEST_VAULT_HANDLE = new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 15, 16, 17}; new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; private static final String TEST_APP_KEY_ALIAS = "rcleaver"; private static final int TEST_GENERATION_ID = 2; private static final int TEST_CREDENTIAL_TYPE = CREDENTIAL_TYPE_PASSWORD; Loading services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncUtilsTest.java +2 −3 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ public class KeySyncUtilsTest { private static final int THM_KF_HASH_SIZE = 256; private static final int KEY_CLAIMANT_LENGTH_BYTES = 16; private static final byte[] TEST_VAULT_HANDLE = new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 15, 16, 17}; new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; private static final String SHA_256_ALGORITHM = "SHA-256"; private static final String APPLICATION_KEY_ALGORITHM = "AES"; private static final byte[] LOCK_SCREEN_HASH_1 = Loading Loading @@ -417,8 +417,7 @@ public class KeySyncUtilsTest { byteBuffer.position(PUBLIC_KEY_LENGTH_BYTES + Long.BYTES + Integer.BYTES); byte[] vaultHandle = new byte[VAULT_HANDLE_LENGTH_BYTES]; byteBuffer.get(vaultHandle); // TODO: Fix this once we fix the code in the KeySyncUtils class assertArrayEquals(new byte[VAULT_HANDLE_LENGTH_BYTES], vaultHandle); assertArrayEquals(TEST_VAULT_HANDLE, vaultHandle); } private static byte[] randomBytes(int n) { Loading Loading
services/core/java/com/android/server/locksettings/recoverablekeystore/KeySyncUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -300,7 +300,7 @@ public class KeySyncUtils { .put(SecureBox.encodePublicKey(thmPublicKey)) .putLong(counterId) .putInt(maxAttempts) .put(new byte[VAULT_HANDLE_LENGTH_BYTES]) // TODO: replace with real vaultHandle .put(vaultHandle) .array(); } Loading
services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ public class KeySyncTaskTest { private static final int TEST_RECOVERY_AGENT_UID = 10009; private static final int TEST_RECOVERY_AGENT_UID2 = 10010; private static final byte[] TEST_VAULT_HANDLE = new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 15, 16, 17}; new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; private static final String TEST_APP_KEY_ALIAS = "rcleaver"; private static final int TEST_GENERATION_ID = 2; private static final int TEST_CREDENTIAL_TYPE = CREDENTIAL_TYPE_PASSWORD; Loading
services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncUtilsTest.java +2 −3 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ public class KeySyncUtilsTest { private static final int THM_KF_HASH_SIZE = 256; private static final int KEY_CLAIMANT_LENGTH_BYTES = 16; private static final byte[] TEST_VAULT_HANDLE = new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 15, 16, 17}; new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; private static final String SHA_256_ALGORITHM = "SHA-256"; private static final String APPLICATION_KEY_ALGORITHM = "AES"; private static final byte[] LOCK_SCREEN_HASH_1 = Loading Loading @@ -417,8 +417,7 @@ public class KeySyncUtilsTest { byteBuffer.position(PUBLIC_KEY_LENGTH_BYTES + Long.BYTES + Integer.BYTES); byte[] vaultHandle = new byte[VAULT_HANDLE_LENGTH_BYTES]; byteBuffer.get(vaultHandle); // TODO: Fix this once we fix the code in the KeySyncUtils class assertArrayEquals(new byte[VAULT_HANDLE_LENGTH_BYTES], vaultHandle); assertArrayEquals(TEST_VAULT_HANDLE, vaultHandle); } private static byte[] randomBytes(int n) { Loading