summaryrefslogtreecommitdiff
path: root/mysql-test/main/func_des_encrypt.result
blob: b81f96f6ef7a17e8384df38055dbf622cf18d9ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
select des_encrypt('hello');
des_encrypt('hello')
€Ö2nV“Ø}
#
# Bug #11643: des_encrypt() causes server to die
#
CREATE TABLE t1 (des VARBINARY(200) NOT NULL DEFAULT '') ENGINE=MyISAM;
INSERT INTO t1 VALUES ('1234'), ('12345'), ('123456'), ('1234567');
UPDATE t1 SET des=DES_ENCRYPT('1234');
SELECT LENGTH(des) FROM t1;
LENGTH(des)
9
9
9
9
SELECT DES_DECRYPT(des) FROM t1;
DES_DECRYPT(des)
1234
1234
1234
1234
SELECT 
LENGTH(DES_ENCRYPT('1234')), 
LENGTH(DES_ENCRYPT('12345')), 
LENGTH(DES_ENCRYPT('123456')), 
LENGTH(DES_ENCRYPT('1234567'));
LENGTH(DES_ENCRYPT('1234'))	LENGTH(DES_ENCRYPT('12345'))	LENGTH(DES_ENCRYPT('123456'))	LENGTH(DES_ENCRYPT('1234567'))
9	9	9	9
SELECT 
DES_DECRYPT(DES_ENCRYPT('1234')), 
DES_DECRYPT(DES_ENCRYPT('12345')), 
DES_DECRYPT(DES_ENCRYPT('123456')), 
DES_DECRYPT(DES_ENCRYPT('1234567'));
DES_DECRYPT(DES_ENCRYPT('1234'))	DES_DECRYPT(DES_ENCRYPT('12345'))	DES_DECRYPT(DES_ENCRYPT('123456'))	DES_DECRYPT(DES_ENCRYPT('1234567'))
1234	12345	123456	1234567
DROP TABLE t1;
End of 5.0 tests