【发布时间】:2015-04-19 04:07:16
【问题描述】:
我正在研究 PL/SQL 。开发者的oracle密码是这样设置的
=> input word => converted to ascii => added 2 to each letter => converted back to word
例如:输入密码是“admin”。 admin 分为字符/字母(a、d、m、i、n) 转换为ascii并添加2并再次转换为word
a=97 97+2 = 99 = c
d=100 100+2=102 = f
m=109 109+2=111 = o
i=105 105+2=107 = k
n=110 110+2=112 = p
我做的是
$pass=str_split('admin');
foreach($pass as $password){
$new_password[]=chr(ord($password)+2);
}
$final= $new_password[0].$new_password[1].$new_password[2].$new_password[3].$new_password[4]; //the values 0-4 is set manually
echo $final;
结果:cfokp
但我无法获得正确的答案来运行命令上的结果字符串并将 oracle 密码与检索到的密码匹配。
【问题讨论】:
-
如果你想要 php 解决方案,为什么要标记这个 oracle plsql?