@Test public void equality() { byte[] masterKeyBytes1 = new byte[32]; byte[] masterKeyBytes2 = new byte[32]; MasterKey masterKey1 = new MasterKey(masterKeyBytes1); MasterKey masterKey2 = new MasterKey(masterKeyBytes2); assertEquals(masterKey1, masterKey2); assertEquals(masterKey1.hashCode(), masterKey2.hashCode()); }
@Override public int hashCode() { return Arrays.hashCode(masterKey); }
MasterKey { @Override public int hashCode() { return Arrays.hashCode(masterKey); } }
MasterKey { @Override public int hashCode() { return Arrays.hashCode(masterKey); } MasterKey(byte[] masterKey); }
MasterKey { @Override public int hashCode() { return Arrays.hashCode(masterKey); } MasterKey(byte[] masterKey); static MasterKey createNew(SecureRandom secureRandom); String deriveRegistrationLock(); StorageKey deriveStorageServiceKey(); byte[] serialize(); @Override boolean equals(Object o); @Override int hashCode(); }
MasterKey { @Override public int hashCode() { return Arrays.hashCode(masterKey); } MasterKey(byte[] masterKey); static MasterKey createNew(SecureRandom secureRandom); String deriveRegistrationLock(); StorageKey deriveStorageServiceKey(); byte[] serialize(); @Override boolean equals(Object o); @Override int hashCode();  }