RebootEscrowKey: use bytes for equivalence

Since RebootEscrowKey started wrapping SecretKey, it is necessary to check
equivalence via a method that does not do object equivalence. Use the
underlying byte array in the tests. equals() could be implemented, but then
hashCode() would need to be implemented which would be based on the private
key.

Test: atest RebootEscrowDataTest
Change-Id: Ia5b0bb822dcd3e59b5898f390fa8670db0b8d4c9
This commit is contained in:
Kenny Root
2020-02-20 09:26:03 -08:00
parent bd8dd47fde
commit 511b45b531

View File

@@ -75,7 +75,7 @@ public class RebootEscrowDataTest {
assertThat(actual.getSpVersion(), is(expected.getSpVersion()));
assertThat(actual.getIv(), is(expected.getIv()));
assertThat(actual.getKey(), is(expected.getKey()));
assertThat(actual.getKey().getKeyBytes(), is(expected.getKey().getKeyBytes()));
assertThat(actual.getBlob(), is(expected.getBlob()));
assertThat(actual.getSyntheticPassword(), is(expected.getSyntheticPassword()));
}