How do you decrypt a string in a Microsoft Access VB module that wasencrypted using EncryptDecrypt i

M

Mel

How do you decrypt a string in a Microsoft Access VB module that was
encrypted using EncryptDecrypt.Encrypt() in C# ASP.NET?

It was encrypted in C# as follows: encryptedPassword =
EncryptDecrypt.Encrypt(myPassword);

Now I want to decrypt it in a Microsoft Access module


Regards

Mel
 
T

Tom van Stiphout

On Sat, 6 Sep 2008 09:58:01 -0700 (PDT), Mel <[email protected]>
wrote:

If you really want to do this in VBA you would have to know the
algorithms used, and re-implement them in VBA.
Or use a library from a vendor who has both a VBA and .NET
implementation.
Or set up a web service if that is possible, so VBA can call a Decrypt
method there.

-Tom.
Microsoft Access MVP
 
M

Mel

If you really want to do this in VBA you would have to know the
algorithms used, and re-implement them in VBA.
Or use a library from a vendor who has both a VBA and .NET
implementation.
Or set up a web service if that is possible, so VBA can call a Decrypt
method there.

-Tom.
Microsoft Access MVP

How/where would I find the algorithm?
 
T

Tom van Stiphout

Eh, the documentation for CryptoProvider.Encrypt comes to mind:
<quote>
The digital rights management system uses Advanced Encryption Standard
(AES) block cipher.
</quote>

It's up to you to find more info about this. If you can't, you'll need
to move on to another option.

-Tom.
Microsoft Access MVP
 
T

Tony Toews [MVP]

Mel said:
How/where would I find the algorithm?

Assuming the C#/ASP.Net is using the Microsoft cryption routines then
searching at MSDN for CryptAcquireContext and advapi32.dll should get
you what you need.

Of course you'll need to know what encryption method the code used and
the encryption key.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

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