Stephen,
>I have a need to send an HTTP post to a website that requires the data
>string to be RC4 encrypted.
Try the attached routine. It seems to be working, but you should make
sure that your PHP routine works the same way and that the website uses
the same algorithm. The example code uses a random numeric key, but what
you probably need to use is a hash (such as Sha256 o MD5) of a key phrase
instead. Those are usually displayed as a (long) hexadecimal string. You
might have to first convert that password into a number or you might have
to convert a hexadecimal string into a number.
In addition, the PHP routine doesn't use any Salt value, so it might not
create the exact results that the website expects, if it incorporates a
Salt value.
This should get you at least started, though.
Andreas
Andreas Gehrs-Pahl
Absolute Software, LLC
phone: (989) 723-9927
email: Andreas.GP@Charter.net
Andreas.Gehrs-Pahl@EJusticeSolutions.com
Andreas@DDPSoftware.com
web: http://www.Aerospace-History.net
files.zip