Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/server/mysql/mysql-test/t/ |
Upload File : |
-- source include/have_ssl_crypto_functs.inc --disable_warnings drop table if exists t1; --enable_warnings create table t1 (x blob); insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','The quick red fox jumped over the lazy brown dog')); insert into t1 values (des_encrypt('a','The quick red fox jumped over the lazy brown dog')); insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','a')); insert into t1 values (des_encrypt('ab','The quick red fox jumped over the lazy brown dog')); insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','ab')); insert into t1 values (des_encrypt('abc','The quick red fox jumped over the lazy brown dog')); insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abc')); insert into t1 values (des_encrypt('abcd','The quick red fox jumped over the lazy brown dog')); insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcd')); insert into t1 values (des_encrypt('abcde','The quick red fox jumped over the lazy brown dog')); insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcde')); insert into t1 values (des_encrypt('abcdef','The quick red fox jumped over the lazy brown dog')); insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdef')); insert into t1 values (des_encrypt('abcdefg','The quick red fox jumped over the lazy brown dog')); insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefg')); insert into t1 values (des_encrypt('abcdefgh','The quick red fox jumped over the lazy brown dog')); insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefgh')); insert into t1 values (des_encrypt('abcdefghi','The quick red fox jumped over the lazy brown dog')); insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefghi')); insert into t1 values (des_encrypt('abcdefghij','The quick red fox jumped over the lazy brown dog')); insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefghij')); insert into t1 values (des_encrypt('abcdefghijk','The quick red fox jumped over the lazy brown dog')); insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefghijk')); insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','sabakala')); insert into t1 values (des_encrypt('quick red fox jumped over the lazy brown dog','sabakala')); insert into t1 values (des_encrypt('red fox jumped over the lazy brown dog','sabakala')); insert into t1 values (des_encrypt('fox jumped over the lazy brown dog','sabakala')); insert into t1 values (des_encrypt('jumped over the lazy brown dog','sabakala')); insert into t1 values (des_encrypt('over the lazy brown dog','sabakala')); insert into t1 values (des_encrypt('the lazy brown dog','sabakala')); insert into t1 values (des_encrypt('lazy brown dog','sabakala')); insert into t1 values (des_encrypt('brown dog','sabakala')); insert into t1 values (des_encrypt('dog','sabakala')); insert into t1 values (des_encrypt('dog!','sabakala')); insert into t1 values (des_encrypt('dog!!','sabakala')); insert into t1 values (des_encrypt('dog!!!','sabakala')); insert into t1 values (des_encrypt('dog!!!!','sabakala')); insert into t1 values (des_encrypt('dog!!!!!','sabakala')); insert into t1 values (des_encrypt('jumped over the lazy brown dog','sabakala')); insert into t1 values (des_encrypt('jumped over the lazy brown dog','sabakala')); select hex(x), hex(des_decrypt(x,'sabakala')) from t1; select des_decrypt(x,'sabakala') as s from t1 having s like '%dog%'; drop table t1; # # Test default keys # select hex(des_encrypt("hello")),des_decrypt(des_encrypt("hello")); select des_decrypt(des_encrypt("hello",4)); select des_decrypt(des_encrypt("hello",'test'),'test'); select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("hello",'default_password')); select des_decrypt(des_encrypt("hello"),'default_password'); select des_decrypt(des_encrypt("hello",4),'password4'); # Test use of invalid parameters --disable_ps_protocol select des_encrypt("hello",10); --enable_ps_protocol select des_encrypt(NULL); select des_encrypt(NULL, 10); select des_encrypt(NULL, NULL); --disable_ps_protocol select des_encrypt(10, NULL); --enable_ps_protocol --disable_ps_protocol select des_encrypt("hello", NULL); --enable_ps_protocol select des_decrypt("hello",10); select des_decrypt(NULL); select des_decrypt(NULL, 10); select des_decrypt(NULL, NULL); select des_decrypt(10, NULL); select des_decrypt("hello", NULL); # Test flush SET @a=des_decrypt(des_encrypt("hello")); flush des_key_file; select @a = des_decrypt(des_encrypt("hello")); # Test usage of wrong password select hex("hello"); select hex(des_decrypt(des_encrypt("hello",4),'password2')); --disable_ps_protocol select hex(des_decrypt(des_encrypt("hello","hidden"))); --enable_ps_protocol explain extended select des_decrypt(des_encrypt("hello",4),'password2'), des_decrypt(des_encrypt("hello","hidden")); # End of 4.1 tests # # Bug#44365 valgrind warnings with encrypt() function # --disable_warnings drop table if exists t1; --enable_warnings create table t1 (f1 smallint(6) default null, f2 mediumtext character set utf8) default charset=latin1; insert into t1 values (null,'contraction\'s'); insert into t1 values (-15818,'requirement\'s'); --disable_result_log select encrypt(f1,f2) as a from t1,(select encrypt(f1,f2) as b from t1) a; --enable_result_log drop table t1;