public static boolean verify(PublicKey publicKey, String signedData, String signature) {
		byte[] signatureBytes;
		try {
			signatureBytes = Base64.decode(signature, Base64.DEFAULT);
		} catch (IllegalArgumentException e) {
			LOGGER.error("Base64 decoding failed.");
			return false;
		}
		try {
			Signature sig = Signature.getInstance(SIGNATURE_ALGORITHM);
			sig.initVerify(publicKey);
			sig.update(signedData.getBytes());
			if (!sig.verify(signatureBytes)) {
				LOGGER.error("Signature verification failed.");
				return false;
			}
			return true;
		} catch (NoSuchAlgorithmException e) {
			LOGGER.error("NoSuchAlgorithmException.");
		} catch (InvalidKeyException e) {
			LOGGER.error("Invalid key specification.");
		} catch (SignatureException e) {
			LOGGER.error("Signature exception.");
		}
		return false;
	}
public static boolean verify ( PublicKey publicKey , String signedData , String signature ) { byte [ ] signatureBytes ; try { signatureBytes = Base64 . decode ( signature , Base64 . DEFAULT ) ; } catch ( IllegalArgumentException e ) { LOGGER . error ( "Base64 decoding failed." ) ; return false ; } try { Signature sig = Signature . getInstance ( SIGNATURE_ALGORITHM ) ; sig . initVerify ( publicKey ) ; sig . update ( signedData . getBytes ( ) ) ; if ( ! sig . verify ( signatureBytes ) ) { LOGGER . error ( "Signature verification failed." ) ; return false ; } return true ; } catch ( NoSuchAlgorithmException e ) { LOGGER . error ( "NoSuchAlgorithmException." ) ; } catch ( InvalidKeyException e ) { LOGGER . error ( "Invalid key specification." ) ; } catch ( SignatureException e ) { LOGGER . error ( "Signature exception." ) ; } return false ; }
Verifies that the signature from the server matches the computed signature on the data.
Returns true if the data is correctly signed.

@param publicKey public key associated with the developer account
@param signedData signed data from server
@param signature server signature
@return true if the data and signature match