Re: Using certificates with WodCrypt - WeOnlyDo Discussion board

Re: Using certificates with WodCrypt (General questions)

by Mark Lancaster, Tuesday, August 31, 2010, 22:37 (2640 days ago) @ woddrazen

Hi Drazen,

I've tried what you suggested but I'm afraid it didn't quite work out.

For the encryption I set SecretKey to eCert.PublicKey and an encrypted file was produced.

For the decrpt, I loaded the decryption certificate using:

dCert.Load App.Path + /test.pfx , password
dCert.LoadKey App.Path + /test.pfx , password

and then set SecretKey to dCert.PrivateKey.

The result was a garbage file.

I then tried setting SecretKey to dCert.PublicKey and this generated the original clear text followed by a number of NULLs.

It looks like the public key is being used literally, like a password, rather than to generate cyphertext that can only be decrpyted using the private key.

Am I missing a step?

Thanks,

Mark.


Complete thread: