473,231 Members | 1,497 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,231 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 4068
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: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.