Unfortunately, the app where the code is in Java is separate from my application. I'm trying to communicate with it. It is not an application on my server.
Christine Davis ColdFusion Lead Nations Technical Services Prairie Village, KS 913-748-8044 ext 4703 [EMAIL PROTECTED] -----Original Message----- From: Andrew Scott [mailto:[EMAIL PROTECTED] Sent: Monday, May 07, 2007 11:41 AM To: CF-Talk Subject: Re: PBEWithMD5AndDES If the code is already written in Java, why not look at CreateObject to use it rather than rewrite it in CF? On 5/8/07, Christine Davis <[EMAIL PROTECTED]> wrote: > > Hello everyone, > > > > I'm entering the brave new world (for me) of encrypting and sharing data > between a couple of different applications. We are attempting to encrypt a > password using PBEWithMD5AndDES. The Java Developer sent me the following > information: > > > > If cleartext (password) is nations1 > > then PBE encrypted is ÷ Yu5+Tpô?__ E > > and Base64 encoded is hfcJiVl1NStUcPQ/EBwgRQ== ** > > ** This (Base64) is the value to store in the external_password field of > correspondence_recipient. > > > > For the example, we're using C1F9J9V5 for the password and IVorSalt thing > and iterations are as follows in Java: > > > > byte[] salt = { > > (byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c, > > (byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99 > > }; > > int count = 20; > > > > > > We've gotten this far: > > > > <cfscript> > > theEncrytString = "nations1"; > > thePassword = "C1F9J9V5"; > > theMethod = "PBEWithMD5AndDES"; > > theEncoding = "Base64"; > > theSalt = "???????"; //WHAT IS THIS???? HOW DO WE DO IT??? > > theIterations = 20; > > test = Encrypt(theEncrytString, thePassword, theMethod, theEncoding); > > //test = Encrypt(theEncrytString, thePassword, theMethod, > theEncoding, theSalt, theIterations); > > </cfscript> > > <cfoutput>#test#</cfoutput> > > > > Could someone please explain the IVorSalt variable, the Java code above > that generates the salt byte array and what iterations are used for? Also, > I believe we need to recreate the Java code in ColdFusion for this to be > shared between the two apps, how do we do that? > > > > Thanks! > > Christine Davis > ColdFusion Lead > Nations Technical Services > Prairie Village, KS > 913-748-8044 ext 4703 > [EMAIL PROTECTED] <blocked::mailto:[EMAIL PROTECTED]> > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277160 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

