@Test public void testSignatureVerificationWithInvalidDocumentHashAlgorithm() throws Exception { RuleResult result = rule.verify(build(TestUtil.loadSignature(SIGNATURE_2017_03_14), new DataHash(HashAlgorithm.SHA2_512, new byte[64]))); Assert.assertEquals(result.getResultCode(), VerificationResultCode.FAIL); Assert.assertEquals(result.getErrorCode(), VerificationErrorCode.GEN_04); }
VerificationErrorCode getErrorCode() { return VerificationErrorCode.GEN_04; }
DocumentHashAlgorithmVerificationRule extends BaseRule { VerificationErrorCode getErrorCode() { return VerificationErrorCode.GEN_04; } }
DocumentHashAlgorithmVerificationRule extends BaseRule { VerificationErrorCode getErrorCode() { return VerificationErrorCode.GEN_04; }  }
DocumentHashAlgorithmVerificationRule extends BaseRule { VerificationErrorCode getErrorCode() { return VerificationErrorCode.GEN_04; }   }
DocumentHashAlgorithmVerificationRule extends BaseRule { VerificationErrorCode getErrorCode() { return VerificationErrorCode.GEN_04; }    }