[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Coldfusion encryption string longer than unecrypted string

Posted on 2009-04-20
4
Medium Priority
?
219 Views
Last Modified: 2013-12-24
I am using Coldfusion's default encrypt() function to encrypt an existing string in a database that is 11 characters long.  The encrypted string is 18 characters which is longer than the database field.  Do I need to make my database field bigger to accomodate this or is there a way to restrict the length of encrypted fields?
0
Comment
Question by:steveweems
  • 2
4 Comments
 
LVL 19

Expert Comment

by:erikTsomik
ID: 24187291
check your database to make it will allow longer characters
0
 
LVL 16

Accepted Solution

by:
duncancumming earned 500 total points
ID: 24187624
You'll either need to add a new column to your table that is longer, or increase the length of the existing column.
0
 

Author Comment

by:steveweems
ID: 24187685
The database is Oracle and I can re-engineer the table to accept longer characters.  I am a little reluctant to do so as the table is has been in use for some time, there may be several dependencies within the database which may need to be addressed.

I was wondering if there is an alternative by using an encrypt function that had some control on the number of characters output.

Thanks
0
 
LVL 16

Expert Comment

by:duncancumming
ID: 24187732
Not that I'm aware of.  The encrypt function takes an optional parameter for the encryption algorithm.  There are many, they are listed here.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_e-g_01.html

Without knowing more about how those work, I couldn't say if any of them will encrypt a string of N-length and return an encrypted string also of N-length.  I doubt it though.

The only other solution would be to do something like Rot13 where you substitute each letter for another character.  This isn't the same as encryption, and isn't secure.  
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
What You Need to Know when Searching for a Webhost Provider
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month20 days, 6 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question