473,471 Members | 4,648 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Weird thing with DES


I use the DES_ENCRYPT and DES_DECRYPT with the string 'sfG3853ncr1pt'
I can't seem to encrypt the number 227968199 because I tried several
times and also tried other numbers which work fine.

Here is a sample session:
mysqlcreate table `destest` (num varchar(17));
Query OK, 0 rows affected (0.04 sec)
mysqldesc destest;
+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| num | varchar(17) | YES | | NULL | |
+-------+-------------+------+-----+---------+-------+
1 row in set (0.00 sec)
mysqlinsert into destest(num) values(DES_ENCRYPT('227968199',
'sfG3853ncr1pt'));
Query OK, 1 row affected (0.00 sec)
mysqlselect * from destest;
+------------------+
| num |
+------------------+
| ÿÿÔ¨ð!?`f4~±ëk† |
+------------------+
1 row in set (0.00 sec)
mysqlselect DES_DECRYPT(num, 'sfG3853ncr1pt') from destest;
+-----------------------------------+
| DES_DECRYPT(num, 'sfG3853ncr1pt') |
+-----------------------------------+
| ÿÿÔ¨ð!?`f4~±ëk† |
+-----------------------------------+
1 row in set (0.00 sec)
mysqlinsert into destest(num) values(DES_ENCRYPT('12345678',
'sfG3853ncr1pt'));
Query OK, 1 row affected (0.00 sec)
mysqlselect DES_DECRYPT(num, 'sfG3853ncr1pt') from destest;
+-----------------------------------+
| DES_DECRYPT(num, 'sfG3853ncr1pt') |
+-----------------------------------+
| ÿÿÔ¨ð!?`f4~±ëk† |
| 12345678 |
+-----------------------------------+
2 rows in set (0.00 sec)
I have also tried

FLUSH DES_KEY_FILE;
It is so weird!
Reply »

Aug 4 '06 #1
0 2112

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Gabriel Afana | last post by:
I have a simple php script to just send email.....When I first load the script in a browser...it sends 2 emails. Why?? The weird thing is then when I refresh the page, it send only one email...I...
1
by: gukn9700 | last post by:
When I used fstream to handle a file, I met with a very weird thing: #include <fstream> #include <iostream> using namespace std; int main() { fstream outfile;
11
by: Les Paul | last post by:
I'm trying to design an HTML page that can edit itself. In essence, it's just like a Wiki page, but my own very simple version. It's a page full of plain old HTML content, and then at the bottom,...
0
by: Greenwich Support | last post by:
Hi All, I have a very weird problem which is occurring with a VB.Net app and PostgreSQL 7.3.1. There is a form that has a standard .Net datagrid on it that contains some data from a table in...
1
by: Ot | last post by:
I have two different solutions that use xml serialization to create xml from a given class. The class is defined identically in both solutions. I copied the code for both the class and the code...
13
by: Krzysztof Bartosiewicz | last post by:
Hi! I have a problem with an access database. The database which I designed and made using MS access works perfectly OK on my computer however it is not working at all on computers for which it...
0
by: Zwyatt | last post by:
having a really weird little bug w/ time_t...check it out: I have the following code (simplified here): #include <time.h> class A { public: char *aString; int aNum;
10
by: Bonj | last post by:
Hello. I hope somebody can help me on this, because I'm running out of options to turn to. I have almost solved my regular expression function. Basically it works OK if unicode is defined. It...
5
by: Peter Oliphant | last post by:
I'm drawing graphics using the Graphics object one can grab in a Form's Paint event. But I'm getting a weird thing happening... These graphic shapes flicker (even if unchanged). UNLESS- I created...
4
by: d3vkit | last post by:
I recently had a friend pass along some web work for me; a simple update. I for some reason decided I would do some overhauling of the page (he had been doing straight html and I figured some php...
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...
1
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.