Hi all,

Before I spend too much more time on this I would like to know if
anybody else has successfully used the System.Security.Cryptography.RC2
algorithm (from managed code) in to encrypt data, and then used CAPI
(from unmanaged code) to decrypt it.

I am aware that the .NET RC2 crypto class just wraps CAPI which is why I
am expecting it to work (but have not been as successful as I would
like). I'm pretty sure my logic is good, as the .NET crypto class can
decrypt data which it has encrypted (and vice-versa for the CAPI code).
Whenever trying between them, though, I just get ERROR_INVALID_DATA (or
something equivalent).

I assume it's to do with the padding, but I can't be sure (.NET crypto
classes support PKCS7 or Zero-byte padding, while CAPI only supports
PCKS5 padding). Again, I find this rather odd, since the .NET crypto
classes are just wrappers for CAPI!

Any ideas?

TIA,
        Adam.

Notice:
The information contained in this e-mail message and any attached files may
be confidential information, and may also be the subject of legal
professional privilege.  If you are not the intended recipient any use,
disclosure or copying of this e-mail is unauthorised.  If you have received
this e-mail in error, please notify the sender immediately by reply e-mail
and delete all copies of this transmission together with any attachments.

Reply via email to