Hi,
We've got a bit of a problem we're trying to resolve. We need to accept some mildly sensitive data passed into A4D as URL parameters from some Java code. To do this, we're combining the parameters into a single string, blowfishing that with a known key (and an empty IV), base64ing that, then URL encoding that to pass as a URL parameter.

This all works fine when I have A4D do both the encoding and the decoding, but when the encoding is being done on the other system, we get gibberish as the output. Conversely, if I have A4D do the encoding and then use an online tool to test the decrypting, it also doesn't recover the plain text correctly (although it can be close sometimes). This is the online decryption tool I've tried:

http://www.tools4noobs.com/online_tools/decrypt/

     Here's an example:

$testencode := Base64 Encode(Blowfish Encrypt("A chunk of test plaintext goes here.";"A Random Key";""))

results in $testencode = bN31CKg6ItVf3KMqQp6nPU6LmNg +azEv2L76SCOGVgkza0yGztOcaQ==

     And then reversing it, like so:

$testdecode:=Blowfish Decrypt(Base64 Decode($TestEncode);"A Random Key";"")

     results in $testdecode = A chunk of test plaintext goes here.

     But when I try decoding it with the online tool, I get:





So, any ideas? One question that has come up from our developer is that the Java code that does the encryption has many more options than just the initialization vector. Are there values that we can use in the Java code that will match the defaults being used by A4D? Things like padding, mode, etc...

     Any help would be much appreciated!
                                                    ---SCJ

P.S. We're using A4D v4.5r1 with 4D v2004.8 on a OSX 10.4.11 server.




--
Scott C. Jensen
  Asst. Director, Office of Info Services
    MIT Corporate Relations - Industrial Liaison Program
      Room W98-050    600 Memorial Drive   Cambridge, MA   02139
        617/253-0441      FAX: 617/258-0796     Email: [email protected]

_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to