• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Pass encrypted values to Java applet

Guest
May 15, 2007 May 15, 2007

Copy link to clipboard

Copied

As the title says I'm trying to pass encrypted values to a java applet. Does anybody have experience with that?

I have 2 problems:

1.) I have to use in coldfusion and in java the same key. In Java I could maybe use serialization to use a existing key - but what about coldfusion?

2.) No matter what algorithm I use (DES/AES) - the values which I encrypted in coldfusion can't be decrypted in java.

TOPICS
Advanced techniques

Views

429

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 15, 2007 May 15, 2007

Copy link to clipboard

Copied

LATEST
Have you checked:

1) That you are using a valid encryption key for your algorithm? You can generate an encryption key for AES in CF by using generateSecretKey():
<cfset sAESKey = generateSecretKey("AES")>

2) Make sure the encoding type of the data is the same between CF and Java (is your encrypted string in Base64, Hex, UU?)

3) Make sure your encrypted string makes the trip between CF and Java without any changes (i.e. your encrypted string in CF looks identical to your encrypted string in Java).

4) What method are you using to perform your AES encryption/decryption in Java?

5) Make sure you are using the same encryption algorithms in both systems. In CF, encrypting in AES:

<cfset AESEncString = Encrypt("Encrypt This!", sAESKey , "AES", "HEX")>

Remember, CF runs on java. so worse case scenario if you can't get CF to encrypt / decrypt your string using Encrypt() / Decrypt(), you can always recreate the java code in CF to perform your action. However, you should be able to successfully move encrypted data between the two systems.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation