public static PGPPrivateKey findPrivateKey(CamelContext context, String keychainFilename, InputStream encryptedInput, String passphrase)
throws IOException, PGPException, NoSuchProviderException {
InputStream keyChainInputStream = ResourceHelper.resolveMandatoryResourceAsInputStream(context.getClassResolver(), keychainFilename);
PGPPrivateKey privKey = null;
try {
privKey = findPrivateKey(context, keyChainInputStream, encryptedInput, passphrase);
} finally {
IOHelper.close(keyChainInputStream);
}