public ContentVerifier get(AlgorithmIdentifier algorithm) throws OperatorCreationException { try { Signature sig = helper.createSignature(algorithm); sig.initVerify(certificate.getPublicKey()); stream = new SignatureOutputStream(sig); } catch (GeneralSecurityException e) { throw new OperatorCreationException("exception on setup: " + e, e); } Signature rawSig = createRawSig(algorithm, certificate.getPublicKey()); if (rawSig != null) { return new RawSigVerifier(algorithm, stream, rawSig); } else { return new SigVerifier(algorithm, stream); } } };
public ContentVerifier get(AlgorithmIdentifier algorithm) throws OperatorCreationException { try { Signature sig = helper.createSignature(algorithm); sig.initVerify(certificate.getPublicKey()); stream = new SignatureOutputStream(sig); } catch (GeneralSecurityException e) { throw new OperatorCreationException("exception on setup: " + e, e); } Signature rawSig = createRawSig(algorithm, certificate.getPublicKey()); if (rawSig != null) { return new RawSigVerifier(algorithm, stream, rawSig); } else { return new SigVerifier(algorithm, stream); } } };
private SignatureOutputStream createSignatureStream(AlgorithmIdentifier algorithm, PublicKey publicKey) throws OperatorCreationException { try { Signature sig = helper.createSignature(algorithm); sig.initVerify(publicKey); return new SignatureOutputStream(sig); } catch (GeneralSecurityException e) { throw new OperatorCreationException("exception on setup: " + e, e); } }
stream = new SignatureOutputStream(sig);
stream = new SignatureOutputStream(sig);
private SignatureOutputStream createSignatureStream(AlgorithmIdentifier algorithm, PublicKey publicKey) throws OperatorCreationException { try { Signature sig = helper.createSignature(algorithm); sig.initVerify(publicKey); return new SignatureOutputStream(sig); } catch (GeneralSecurityException e) { throw new OperatorCreationException("exception on setup: " + e, e); } }