@Test public void testUserPublicationHashDoesNotEqualToSignaturePublicationHash_Ok() throws Exception { PublicationData publication = new PublicationData(new Date(), new DataHash(HashAlgorithm.SHA2_256, new byte[32])); RuleResult result = rule.verify(build(TestUtil.loadSignature(EXTENDED_SIGNATURE_2017_03_14), publication)); Assert.assertEquals(result.getResultCode(), VerificationResultCode.FAIL); Assert.assertEquals(result.getErrorCode(), VerificationErrorCode.PUB_04); }
@Override VerificationErrorCode getErrorCode() { return VerificationErrorCode.PUB_04; }
UserProvidedPublicationHashEqualsToSignaturePublicationHashRule extends BaseRule { @Override VerificationErrorCode getErrorCode() { return VerificationErrorCode.PUB_04; } }
UserProvidedPublicationHashEqualsToSignaturePublicationHashRule extends BaseRule { @Override VerificationErrorCode getErrorCode() { return VerificationErrorCode.PUB_04; }  }
UserProvidedPublicationHashEqualsToSignaturePublicationHashRule extends BaseRule { @Override VerificationErrorCode getErrorCode() { return VerificationErrorCode.PUB_04; }   }
UserProvidedPublicationHashEqualsToSignaturePublicationHashRule extends BaseRule { @Override VerificationErrorCode getErrorCode() { return VerificationErrorCode.PUB_04; }    }