signer.update(data);
// verify the signature on the input data using the private key and return it
return (signer.verify(sig));
} catch (GeneralSecurityException e) {
// catch any exceptions and throw a K2 exception
throw new EncryptionException("DSA verification failed unexpectedly", e);
}
}