Link to home
Start Free TrialLog in
Avatar of PDubs
PDubs

asked on

Using .NET for PGP encrypted query string

I need to pass two params to a URL (black box). I am being told that as long as I concatenate the string of params (similar to "param1=A#param2=B"), I can then encrypt the string using PGP and pass that encrypted string as a single param to where it needs to go. I have been provided the target's public key.

According to documentation I have found, PGP needs to have a file to read from. Is there a way I can make this happen without writing to a file? I absolutely must use PGP and their public key to perform this encrypted query string method. I am using .NET on WinTel platform, VB or C# independent.
ASKER CERTIFIED SOLUTION
Avatar of rsriprac
rsriprac

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
silly question:
  why do you encrypt params when everyone on world can easyly decrypt it with the public key?
  sounds like a useless use of encryption ...

PGP/GPG can either read the data or the public key from STDIN, some versions of PGP can also read from a previously opend file  handle (AFAIK up to PGP 6.5.3), both, GPG and PGP also support a --batch option for that purpose.
Avatar of PDubs
PDubs

ASKER

Ram -- Good suggestion. It works like a charm.

Hoffmann -- I am limited to the requirements given to me, that's why.