use of com.webauthn4j.converter.AuthenticatorDataConverter in project webauthn4j-spring-security by webauthn4j.
the class WebAuthnAuthenticationRequestTest method equals_hashCode_test.
@Test
public void equals_hashCode_test() {
byte[] clientDataJSON = TestDataUtil.createClientDataJSON(ClientDataType.WEBAUTHN_GET);
byte[] authenticatorData = new AuthenticatorDataConverter(objectConverter).convert(TestDataUtil.createAuthenticatorData());
WebAuthnAuthenticationRequest requestA = new WebAuthnAuthenticationRequest(new byte[] { 0x01, 0x23 }, clientDataJSON, authenticatorData, new byte[] { 0x45, 0x56 }, "");
WebAuthnAuthenticationRequest requestB = new WebAuthnAuthenticationRequest(new byte[] { 0x01, 0x23 }, clientDataJSON, authenticatorData, new byte[] { 0x45, 0x56 }, "");
assertThat(requestA).isEqualTo(requestB).hasSameHashCodeAs(requestB);
}
Aggregations