public void init(PGPContentVerifierBuilderProvider verifierBuilderProvider, PGPPublicKey pubKey) throws PGPException { PGPContentVerifierBuilder verifierBuilder = verifierBuilderProvider.get(sigPck.getKeyAlgorithm(), sigPck.getHashAlgorithm()); verifier = verifierBuilder.build(pubKey); lastb = 0; sigOut = verifier.getOutputStream(); }
/** * Initialise the signature object for verification. * * @param verifierBuilderProvider provider for a content verifier builder for the signature type of interest. * @param pubKey the public key to use for verification * @throws PGPException if there's an issue with creating the verifier. */ public void init(PGPContentVerifierBuilderProvider verifierBuilderProvider, PGPPublicKey pubKey) throws PGPException { PGPContentVerifierBuilder verifierBuilder = verifierBuilderProvider.get(sigPack.getKeyAlgorithm(), sigPack.getHashAlgorithm()); verifier = verifierBuilder.build(pubKey); lastb = 0; sigOut = verifier.getOutputStream(); }
/** * Helper for signature verification. */ protected PGPContentVerifierBuilderProvider getVerifierProvider() { return new BcPGPContentVerifierBuilderProvider(); }