Hi Claude, Check out the 'spaces in column names' discussion in this list.. one suggestion from that was to use
queryname['stupidfieldname?'][queryname.CurrentRow] On Oct 17, 10:50 am, Claude Raiola <[EMAIL PROTECTED]> wrote: > Hi, > I am sent a datafile in excel format from a financial institution however one > of the column names is loan type. > > Given the column name has a space between the 2 words cf thrown an error when > i am trying to output the data from the excel file using #loan type#. > > Is there some code i can use to automatically modify the column name to > change the name from loan type to loan_type thus making it compliant with CF. > This excel file is sent each month from the financial institution and i am > wanting to automate the process of being able to generate reports from the > data without needing manually change the excel file column name each time > > Regards > Claude Raiola > Websites: > www.AustralianAccommodation.com > www.SAMARIS.NET > www.WebSiteSolutions.com.au > Mobile: 0414 228 948On Wed Oct 17 10:11 , Pat Branley sent: > Duncan > What I think is happening is that CF expects the key to be Base64 > encoded, hence the problems with &, ^ and the need for == at the end. > Try using the 'sun.misc.BASE64Encoder' class to encode the key before > passing it to the decrypt / encrypt functions. > Pat > On Oct 17, 10:22 am, Duncan <[EMAIL PROTECTED]> wrote: > > I am waiting on the third party to redo the encryption with a key that > > doesn't have any required padding i.e. they provide a full 24 char > > string) and doesn't have any of the identified dodgy chars & and ^ > > > > 'It works fine' means encrypting and decrypting within CF using an > > example such as Pete > > Freitagsentryhttp://www.petefreitag.com/item/222.cfmAndsubstituting the > > GenerateSecretKey() with a hand written key. > > > > So far I have only established that CF has some issues with the key he > > provided. I have no idea if we will be able to decrypt it properly > > yet. > > > > I will update with some more info once I get a new key from the .NET guy! > > > > On 10/16/07, MrBuzzy <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > Hi Duncan, you had a lot of stuff going on there :) > > > > > When you say 'it works fine'... have you soled your problem? Or only part? > > > > > Perhaps you could post the updated source code. > > > > > Cheers. > > > > > On 10/16/07, Duncan <[EMAIL PROTECTED]> wrote: > > > > > > So far in my investigation and trial and error, I have discovered that > > > > the AES key you use cannot have ^ or & in it. The key we were provided > > > > by the .NET side did have these in. Another thing is that padding to > > > > 24 characters renders the error " The key specified is not a valid key > > > > for this encryption: Invalid AES key length: 7 bytes" - 7 bytes? Its > > > > like CF doesnt even see the extra spaces. So I replaced the spaces > > > > with 3's and I get an 18 byte string? What in the wierd? > > > > > > Replace the last 2 characters with == and it works fine, my manually > > > > generated key is 7+8sh+dWEf333333333333== > > > > > > I am putting this out there because its causing me no end of problems, > > > > and I cant find anything out in google land or on blogs about this. > > > > > > On 10/16/07, Duncan <[EMAIL PROTECTED]> wrote: > > > > > I hope someone with a little knowledge of Encryption and AES stuff can > > > > > help me out with how to use a provided key to decrypt some info. > > > > > > > Your time here would be greatly appreciated. Details below. > > > > > > > On 10/15/07, Duncan <[EMAIL PROTECTED]> wrote: > > > > > > Hi all, > > > > > > > > I have a token that is being passed in via the URL, that is > > > > > > generated > > > > > > in a .NET program. I am having trouble decoding it in CF 8 so I was > > > > > > hoping that someone could give me a hand. I am very frustrated with > > > > > > this as this is my first dive into AES. > > > > > > > > The .NET developer gave me the following instructions: > > > > > > > > These are the steps needed to return the key in the email back to > > > > > > it's > > > > > > original state > > > > > > > > 1. URLDecode the key > > > > > > 2. Convert result to decoded base64 binary > > > > > > 3. Remove chr(0) from end of string > > > > > > 4. Decrypt from AES192 (requires a 24 character Key). Hence > > > > > > make sure you pad the hash key with spaces at the end up to 24 > > > > > > characters > > > > > > > > And here is what I have code wise now (I changed the key to keep it > > > private): > > > > > > > > > > > > > > > > > > > > > > forDec="OTg4MTc6NjcmOEpoXmRXRWY0JSVHWUcqb2xpa3VqZGxveHRvbkByZWQ1LmNvbS5hdQ%3D%3D"> > > > > > > > > > > > > > > > > > > > #forDec# > > > > > > > > > > > > > > > > > > > #forDec# > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This results in a bytearray cannot be converted to strings error. > > > > > > So I > > > > > > tried forDec.toString(), but every request this generates a > > > > > > different > > > > > > value - how can this be? > > > > > > > > > > Decrypt(BinaryEncode(forDec,"base64"),BinaryDecode(key,"base64"),"AES","base64")> > > > > > > > > Results in getting an error that " The input and output encodings > > > > > > are > > > > > > not same." > > > > > > > > I am at a loss and tearing my hair out - can anyone help me out > > > here??? > > > > > > > > -- > > > > > > Duncan I Loxton > > > > > >[EMAIL PROTECTED] > > > > > > > -- > > > > > Duncan I Loxton > > > > >[EMAIL PROTECTED] > > > > > > -- > > > > Duncan I Loxton > > > >[EMAIL PROTECTED] > > > > -- > > Duncan I Loxton > >[EMAIL PROTECTED] Hide quoted text - > > > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---