public boolean verify(KeyStoreChooser keyStoreChooser, PublicKeyChooserByAlias publicKeyChooserByAlias, String message,
			String signature) {
		Base64EncodedVerifier verifier = cache.get(cacheKey(keyStoreChooser, publicKeyChooserByAlias));

		if (verifier != null) {
			return verifier.verify(message, signature);
		}

		Base64EncodedVerifierImpl verifierImpl = new Base64EncodedVerifierImpl();
		verifierImpl.setAlgorithm(algorithm);
		verifierImpl.setCharsetName(charsetName);
		verifierImpl.setProvider(provider);
		PublicKey publicKey = publicKeyRegistryByAlias.get(keyStoreChooser, publicKeyChooserByAlias);

		if (publicKey == null) {
			throw new SignatureException("public key not found: keyStoreName=" + keyStoreChooser.getKeyStoreName()
					+ ", alias=" + publicKeyChooserByAlias.getAlias());
		}

		verifierImpl.setPublicKey(publicKey);
		cache.put(cacheKey(keyStoreChooser, publicKeyChooserByAlias), verifierImpl);
		return verifierImpl.verify(message, signature);
	}
public boolean verify ( KeyStoreChooser keyStoreChooser , PublicKeyChooserByAlias publicKeyChooserByAlias , String message , String signature ) { Base64EncodedVerifier verifier = cache . get ( cacheKey ( keyStoreChooser , publicKeyChooserByAlias ) ) ; if ( verifier != null ) { return verifier . verify ( message , signature ) ; } Base64EncodedVerifierImpl verifierImpl = new Base64EncodedVerifierImpl ( ) ; verifierImpl . setAlgorithm ( algorithm ) ; verifierImpl . setCharsetName ( charsetName ) ; verifierImpl . setProvider ( provider ) ; PublicKey publicKey = publicKeyRegistryByAlias . get ( keyStoreChooser , publicKeyChooserByAlias ) ; if ( publicKey == null ) { throw new SignatureException ( "public key not found: keyStoreName=" + keyStoreChooser . getKeyStoreName ( ) + ", alias=" + publicKeyChooserByAlias . getAlias ( ) ) ; } verifierImpl . setPublicKey ( publicKey ) ; cache . put ( cacheKey ( keyStoreChooser , publicKeyChooserByAlias ) , verifierImpl ) ; return verifierImpl . verify ( message , signature ) ; }
Verifies the authenticity of a message using a base64 encoded digital
signature.

@param keyStoreChooser the keystore chooser
@param publicKeyChooserByAlias the public key chooser
@param message the message to sign
@param signature the base64 encoded digital signature
@return true if the authenticity of the message is verified by the
digital signature