CryptoAPI --> Framework?

  • Thread starter Thread starter Richard Fischer
  • Start date Start date
R

Richard Fischer

Hello all

Im trying to port an application (i.e. rewrite it...) to .NET.
To crypt passwords, I used the advapi32.dll. The following
steps were required to Crypt/Decrypt:
- Acquire Context (I'm using RSA)
- Hash the plain Key (using MD5)
- Derive the Key (using RC4)
- De/Crypt the data

Now I'm looking into the System.Security.Crypto... classes to find
out how to retrieve my old data using the knonw pwds - so far with
much confusion and no success.

Can anybode enlighten me on how to use a smilar technique with the
..NET framework to get the same results?

Thanks in advance for any help
Richard
 
Have you thought of using the same API (advapi32.dll) via P/Invoke?

Would that work for you?

Best regards,
Cezary Nolewajka

Consultant | Microsoft Services | Microsoft | Poland
 
Hi

Cezary Nolewajka said:
Have you thought of using the same API (advapi32.dll) via P/Invoke?

Would that work for you?
Certainly it would work - but: why then port the application to .NET, if I'd
have to use unmanaged code?

Thanks and greetings
Richard
 
Back
Top