1-- source include/not_openssl.inc 2 3# 4# Test output from des_encrypt and des_decrypt when server is 5# compiled without openssl suuport 6# 7select des_encrypt("test", 'akeystr'); 8select des_encrypt("test", 1); 9select des_encrypt("test", 9); 10select des_encrypt("test", 100); 11select des_encrypt("test", NULL); 12select des_encrypt(NULL, NULL); 13select des_decrypt("test", 'anotherkeystr'); 14select des_decrypt(1, 1); 15select des_decrypt(des_encrypt("test", 'thekey')); 16 17 18# 19# Test default keys 20# 21select hex(des_encrypt("hello")),des_decrypt(des_encrypt("hello")); 22select des_decrypt(des_encrypt("hello",4)); 23select des_decrypt(des_encrypt("hello",'test'),'test'); 24select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("hello",'default_password')); 25select des_decrypt(des_encrypt("hello"),'default_password'); 26select des_decrypt(des_encrypt("hello",4),'password4'); 27 28# Test flush 29SET @a=des_decrypt(des_encrypt("hello")); 30flush des_key_file; 31select @a = des_decrypt(des_encrypt("hello")); 32 33# Test usage of wrong password 34select hex("hello"); 35select hex(des_decrypt(des_encrypt("hello",4),'password2')); 36select hex(des_decrypt(des_encrypt("hello","hidden"))); 37 38# End of 4.1 tests 39