473,395 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to Store 3DES encrypted String in MySQL column

plz tell me how to store a string encrypted by 3DES algorithm.i want to store password column to be stored by using this algorithm.
Thanks.
Feb 22 '08 #1
1 4075
ronverdonk
4,258 Expert 4TB
When you use the mcrypt_encrypt command to encrypt, you know that the returned crypttext string can be larger that the size of the data that is encrypted.
So your MySQL table column must be large enough to hold the largest.

Since it is a password, it will probably no longer than 24 chars.

To be on the safe side, it does not hurt to make the table column a VARCHAR with enough chars to contain your crypt result.

Ronald
Feb 22 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: jacob nikom | last post by:
Hi, I would like to store XML files in MySQL. What is the best solution: 1. Convert it to string and store it as CLOB/text 2. Serialize it and store as byte array 3. Flatten it out and create...
0
by: Senthil Kannan | last post by:
Hi all, Currently i have a FORM_BASED Authentication of tomcat5.0 to store and retrieve passwords in my homepage.Now when i try to Store my password in a encrypted form i am having some problems,i...
6
by: Ian Davies | last post by:
Hello I would like to query the user table of the mysql database from my VB application to check that a user's password entered in a text field on a form corresponds to that users password in the...
0
by: Kelvin | last post by:
Dear all, I don't know how to write a asp/vb/c# program to decrypt PHP encrypted code. Here is attched my code in PHP $key = "ab"; $random_number = kelvin;...
0
by: Sathyaish | last post by:
I am using CBC as the cipher mode to decrypt some text I'd encrypted using the same mode for 3DES algorithm. My decrypt does not return the correct result because the TransformBlock method returns...
1
by: Sathyaish | last post by:
I have the following scenario: Algorithm: 3DES Cipher Mode: CBC Key Size: 128-bit Block Size: 64 bit IV: 0x0000000000000000 (an eight byte array of zeros) The results I get using .NET with...
0
by: Nobody | last post by:
I'm new to ASP.NET, so I'm trying to write a simple store front to get me into things. Obviously with users and such, I need to encrypt the passwords. No problem there. I wrote a little encryption...
3
by: ipy2006 | last post by:
I encrypted a string within a Java application. I need to store that encrypted string in a given field in the DB2 database. Currently the datatype for that field is char(10). I am getting a...
3
by: tshad | last post by:
I am trying to use 3DES to encrypt my keys and am using VS 2003. I am trying to pass a value like: mCJ4@L2= where the value is 8 bytes long. I was told that you need a 16 byte key. But this...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.