I'm tring to display an encrypted number store in sql database I have a key store in my application.cfm. and they number in my database is encrypted. My display code looks like this
Well it turns out when every my encrypted string has a " in it when it gets store to my sql database it stops at the " . Is there any way to create the encryption string with no characters?
look my friend i had the same problem and i solved using this kind of encryption
<cfparam name="Request.PasswordKey" default="keyyyyyyyyyyyyyy">
<cfset Encrypted = Encrypt(form.number, Request.PasswordKey)>
<cfquery datasource="db">
Insert Into table (field1, field2, ,field3)
Values
(<cfqueryparam value="#form.na#">, <cfqueryparam value="#Encrypted#">)
</cfquery>
and when you want to decrypt the date
use
<cfset decrypt = decrypt(fildes, Request.PasswordKey)>
look my friend i had the same problem and i solved using this kind of encryption
Encryption was not the problem. It was the lack of cfqueryparam, as I already mentioned.
Though, I agree with Salem about security. If you are storing credit card information security and encryption should be very tight. If you are not well versed in it or don't have the experience and resources, there are reputable companies that do. Consider the liability if security is poor ..
what is the data type in the database for credit_card_type,credit_card_number, isn't varchar, and another thing take off the cfsqltype="(Varchar)" from the cfqueryparam.
and if you want to solve the problem just use the encryption method i send it to you.
i do have the link for the encryption example and i will send it to you tomorrow from work.
Thanks
I did take out the cfsqltype anything I try I can't get it to store the encryption string. Database types i tried varchar nvarchar and ntext right now it's back to varchar
You need to use the correct syntax. "cfsqltype="(Varchar)"> is not a valid cfsqltype. If you use an invalid type ColdFusion defaults to the type for "char" which may cause unexpected results. All cfsqltypes start with "cf_" like: cf_sql_varchar, cf_sql_integer, etc... You can look up the types in the online documentation.
How reversable are they if you don't have the key?
Adobe's own documentation states that Encrypt uses the CFMX_COMPAT method by default and "This algorithm is the least secure option (default). " Not very secure in comparison to other, better, encryption algorithms. Would you use it if you thought you might be held liable for the consequences?
Now I know you are joking around .. because that still uses Encrypt - with the default CFMX_COMPAT. Hardly good enough security for credit card information.
All the others you need to use generate secret key. How would that work how do I decrypt the credit card if I don't know what the key is?
It is not just encryption. Some credit card companies require merchants to meet certain requirements and also pass a certification process if they intend to store credit card info.