Easiest way to decrypt PGP-encrypted files from VBA (MS Access)

I need to write code that picks up PGP-encrypted files from an FTP location and processes them. The files will be encrypted with my public key (not that I have one yet). Obviously, I need a PGP library that I can use from within Microsoft Access. Can you recommend one that is easy to use?

I'm looking for something that doesn't require a huge amount of PKI knowledge. Ideally, something that will easily generate the one-off private/public key pair, and then have a simple routine for decryption.

Answers


A command line solution is good. If your database is an internal application, not to be redistributed, I can recommend Gnu Privacy Guard. This command-line based tool will allow you to do anything that you need to with regard to the OpenPGP standard.

Within Access, you can use the Shell() command in a Macro like this:

Public Sub DecryptFile(ByVal FileName As String)
  Dim strCommand As String
  strCommand = "C:\Program Files\GNU\GnuPG\gpg.exe " _
  & "--batch --passphrase ""My PassPhrase that I used""" & FileName
  Shell strCommand, vbNormalFocus
End Sub

This will run the command-line tool to decrypt the file. This syntax uses a plaintext version of your secret passphrase. This is not the most secure solution, but is acceptable if your database is internal and only used by trusted personnel. GnuPG supports other techniques to secure the passphrase.


Need Your Help

PHP - how to resize directory full of images if under a certion width x height

php image batch-processing

Looking for an easy way to resize a directory of images to a given set width and height.

Is the YUI Loader Utility reliable?

javascript yui

I've been using the YUI Components and want to begin using the Loader Utility to specify my dependencies on my page. From your experience, is the YUI Loader Utility a reliable way to load Javascript

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.