Click here to get back home

Weird thing with DES

 HomeNewsGroups | Search | About
 mailing.database.mysql    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Weird thing with DES soup_or_power 08-04-2006
Get Chitika Premium
Posted by soup_or_power on August 4, 2006, 5:27 pm
Please log in for more thread options

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:


mysql> create table `destest` (num varchar(17));
Query OK, 0 rows affected (0.04 sec)


mysql> desc destest;
+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| num | varchar(17) | YES | | NULL | |
+-------+-------------+------+-----+---------+-------+
1 row in set (0.00 sec)


mysql> insert into destest(num) values(DES_ENCRYPT('227968199',
'sfG3853ncr1pt'));
Query OK, 1 row affected (0.00 sec)


mysql> select * from destest;
+------------------+
| num |
+------------------+
| =FF=FF=D4=A8=F0!?`f4~=B1=EBk=86 |
+------------------+
1 row in set (0.00 sec)


mysql> select DES_DECRYPT(num, 'sfG3853ncr1pt') from destest;
+-----------------------------------+
| DES_DECRYPT(num, 'sfG3853ncr1pt') |
+-----------------------------------+
| =FF=FF=D4=A8=F0!?`f4~=B1=EBk=86 |
+-----------------------------------+
1 row in set (0.00 sec)


mysql> insert into destest(num) values(DES_ENCRYPT('12345678',
'sfG3853ncr1pt'));
Query OK, 1 row affected (0.00 sec)


mysql> select DES_DECRYPT(num, 'sfG3853ncr1pt') from destest;


+-----------------------------------+
| DES_DECRYPT(num, 'sfG3853ncr1pt') |
+-----------------------------------+
| =FF=FF=D4=A8=F0!?`f4~=B1=EBk=86 |
| 12345678 |
+-----------------------------------+
2 rows in set (0.00 sec)


I have also tried

FLUSH DES_KEY_FILE;=20


It is so weird!=20


Reply =BB


Similar ThreadsPosted
Is KEY and INDEX the same thing? October 28, 2005, 1:24 pm
A simple thing! January 30, 2006, 6:25 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap