Asymmetric Encryption in VBA

R

Reto Huber

Hi everybody



I would like to encrypt a string with a public key (in Outlook), send the
encrypted data to a server and decrypt the data on the server with the
private key (an application server which isn't part of the problem now).
Unfortunately I couldn't find an example or a description to encrypt the
data with VBA and Outlook 2003 (Windows XP). There are examples for
symmetric encryption but no one that shows the asymmetric encryption. Can
somebody explain me how I can import the public key into the VBA Program and
encrypt the data? The public key does already exist as a byte stream.



Thank you in advanced for your help.



Kindest regards,

Reto
 
J

Jonathan West

Reto Huber said:
Hi everybody



I would like to encrypt a string with a public key (in Outlook), send the
encrypted data to a server and decrypt the data on the server with the
private key (an application server which isn't part of the problem now).
Unfortunately I couldn't find an example or a description to encrypt the
data with VBA and Outlook 2003 (Windows XP). There are examples for
symmetric encryption but no one that shows the asymmetric encryption. Can
somebody explain me how I can import the public key into the VBA Program
and encrypt the data? The public key does already exist as a byte stream.


I doubt that there is publicly-available VBA-specific code for this, but
there may well be VB code. Do a websearch for VB code. Ignore anything to do
with VB.NET, the language is too different from VBA for any pasted code to
be usable. You need to find some VB6 samples. VB6 and VBA are essentially
the same core language.
 
R

Reto Huber

Jonathan West said:
I doubt that there is publicly-available VBA-specific code for this, but
there may well be VB code. Do a websearch for VB code. Ignore anything to
do with VB.NET, the language is too different from VBA for any pasted code
to be usable. You need to find some VB6 samples. VB6 and VBA are
essentially the same core language.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

Hi Jonathan

Thank you for your hint. I have already done that. I found some code to
access the cryptographic functions of the advapi32.dll but I didn't get the
clue to use my existing public key :-(

Kindest regards,
Reto
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top