string x_temp_str1
string x_temp_str2
integer x_length
integer x_position1
integer x_position2
integer x_temp_int1
integer x_temp_int2
user_string = trim(user_string)
user_string = upper(user_string)
pw_string = trim(pw_string)
pw_string = upper(pw_string)
if len(pw_string) > 0 then
x_length = len(user_string)
x_position1 = 1
x_temp_int1 = 0
do while x_position1 <= x_length
x_temp_str1 = mid(user_string,x_position1,1)
x_temp_int2 = asc(x_temp_str1)
x_temp_int1 = x_temp_int1 + x_temp_int2
x_position1 ++
loop
x_temp_int1 = x_temp_int1 + x_length
do while x_temp_int1 > 122
x_temp_int1 = x_temp_int1 - 75
loop
x_temp_str2 = left(pw_string,1)
x_temp_int2 = asc(x_temp_str2)
x_temp_int1 = x_temp_int1 + x_temp_int2
if x_temp_int1 > 122 and x_temp_int1 < 198 then
x_temp_int1 = x_temp_int1 - 75
end if
if x_temp_int1 > 197 then
x_temp_int1 = x_temp_int1 - 133
end if
if x_temp_int1 > 57 and x_temp_int1 < 65 then
x_temp_int1 = x_temp_int1 - 7
end if
if x_temp_int1 > 90 and x_temp_int1 < 97 then
x_temp_int1 = x_temp_int1 - 6
end if
x_length = len(pw_string)
x_temp_int2 = x_length - 1
pw_string = char(x_temp_int1) + right(pw_string,x_temp_int2)
x_position1 = 1
do while x_position1 <= x_length
x_temp_str1 = mid(pw_string,x_position1,1)
x_temp_int1 = asc(x_temp_str1)
x_position2 = x_position1 - 1
if x_position2 = 0 then
x_position2 = x_length
end if
x_temp_str2 = mid(pw_string,x_position2,1)
x_temp_int2 = asc(x_temp_str2)
x_temp_int1 = x_temp_int1 + x_temp_int2
if x_temp_int1 > 122 and x_temp_int1 < 198 then
x_temp_int1 = x_temp_int1 - 75
end if
if x_temp_int1 > 197 then
x_temp_int1 = x_temp_int1 - 133
end if
if x_temp_int1 > 57 and x_temp_int1 < 65 then
x_temp_int1 = x_temp_int1 - 7
end if
if x_temp_int1 > 90 and x_temp_int1 < 97 then
x_temp_int1 = x_temp_int1 - 6
end if
if x_position1 = 1 then
x_temp_int2 = x_length - 1
pw_string = char(x_temp_int1) + right(pw_string,x_temp_int2)
else
x_temp_int2 = x_length - x_position1
x_position1 = x_position1 - 1
pw_string = left(pw_string,x_position1) + char(x_temp_int1) + right(pw_string,x_temp_int2)
x_position1 ++
end if
x_position1 ++
loop
else
pw_string = " "
end if
return pw_string
uj5u.com熱心網友回復:
密碼加密嗎?uj5u.com熱心網友回復:
估計是加密函式uj5u.com熱心網友回復:
string x_temp_str1 //字串變數string x_temp_str2 //字串變數
integer x_length //整型變數
integer x_position1 //整型變數
integer x_position2 //整型變數
integer x_temp_int1 //整型變數
integer x_temp_int2 //整型變數
//這里直接用,user_string應該是全域變數或者這個函式的引數變數。
user_string = trim(user_string) //去掉兩邊空格
user_string = upper(user_string) //轉成大寫
pw_string = trim(pw_string) //去掉兩邊空格
pw_string = upper(pw_string) //轉成大寫
if len(pw_string) > 0 then //如果pw_string的長度大于0,執行這里
x_length = len(user_string) //得到user_string的長度
x_position1 = 1
x_temp_int1 = 0
do while x_position1 <= x_length //回圈
x_temp_str1 = mid(user_string,x_position1,1) //依次取user_string的字符
x_temp_int2 = asc(x_temp_str1) //得到這個字符的asc碼
x_temp_int1 = x_temp_int1 + x_temp_int2 //把這些字符的asc碼相加
x_position1 ++ //位置后移1個。
loop
x_temp_int1 = x_temp_int1 + x_length //所有字符的asc的和 + 字串長度
//利用回圈,依次減去75,讓最后的值成為不大于122的值。
do while x_temp_int1 > 122
x_temp_int1 = x_temp_int1 - 75
loop
x_temp_str2 = left(pw_string,1) //密碼的左邊第一個字符
x_temp_int2 = asc(x_temp_str2) //轉成asc碼
x_temp_int1 = x_temp_int1 + x_temp_int2 //兩個變數相加。
//在根據資料范圍的要求,減一下
if x_temp_int1 > 122 and x_temp_int1 < 198 then
x_temp_int1 = x_temp_int1 - 75
end if
//在根據資料范圍的要求,減一下
if x_temp_int1 > 197 then
x_temp_int1 = x_temp_int1 - 133
end if
//在根據資料范圍的要求,減一下
if x_temp_int1 > 57 and x_temp_int1 < 65 then
x_temp_int1 = x_temp_int1 - 7
end if
//在根據資料范圍的要求,減一下
if x_temp_int1 > 90 and x_temp_int1 < 97 then
x_temp_int1 = x_temp_int1 - 6
end if
//這里得到的應該就是種子了。
x_length = len(pw_string) //密碼的長度
x_temp_int2 = x_length - 1 //長度減1
//把上面的種子轉成字符,再配上密碼的后面的字串,得到一個新的串
pw_string = char(x_temp_int1) + right(pw_string,x_temp_int2)
x_position1 = 1
//回圈
do while x_position1 <= x_length
x_temp_str1 = mid(pw_string,x_position1,1) //取字符
x_temp_int1 = asc(x_temp_str1) //得到asc碼
x_position2 = x_position1 - 1 //下面的自己看吧。
if x_position2 = 0 then
x_position2 = x_length
end if
x_temp_str2 = mid(pw_string,x_position2,1)
x_temp_int2 = asc(x_temp_str2)
x_temp_int1 = x_temp_int1 + x_temp_int2
if x_temp_int1 > 122 and x_temp_int1 < 198 then
x_temp_int1 = x_temp_int1 - 75
end if
if x_temp_int1 > 197 then
x_temp_int1 = x_temp_int1 - 133
end if
if x_temp_int1 > 57 and x_temp_int1 < 65 then
x_temp_int1 = x_temp_int1 - 7
end if
if x_temp_int1 > 90 and x_temp_int1 < 97 then
x_temp_int1 = x_temp_int1 - 6
end if
if x_position1 = 1 then
x_temp_int2 = x_length - 1
pw_string = char(x_temp_int1) + right(pw_string,x_temp_int2)
else
x_temp_int2 = x_length - x_position1
x_position1 = x_position1 - 1
pw_string = left(pw_string,x_position1) + char(x_temp_int1) + right(pw_string,x_temp_int2)
x_position1 ++
end if
x_position1 ++
loop
else
pw_string = " "
end if
return pw_string
uj5u.com熱心網友回復:
樓上有功夫啊。uj5u.com熱心網友回復:
樓上有功夫啊。uj5u.com熱心網友回復:
樓上有功夫啊。uj5u.com熱心網友回復:
牛人 這么有耐心呀!向3樓學習。uj5u.com熱心網友回復:
牛人 這么有耐心呀!向3樓學習。uj5u.com熱心網友回復:
牛人 這么有耐心呀!向3樓學習。uj5u.com熱心網友回復:
佩服3樓!!!uj5u.com熱心網友回復:
是的,關鍵是3樓的耐心,這個很讓人服氣uj5u.com熱心網友回復:
編程最需要這個.uj5u.com熱心網友回復:
膜拜下3樓。精神可嘉,學習~
uj5u.com熱心網友回復:
膜拜下3樓。uj5u.com熱心網友回復:
過來看看……頂3樓!uj5u.com熱心網友回復:
牛人 這么有耐心呀!向3樓學習。uj5u.com熱心網友回復:
向3樓學習。uj5u.com熱心網友回復:
還沒有搞定么.uj5u.com熱心網友回復:
太有耐心了!!3樓的,向您膜拜...
uj5u.com熱心網友回復:
呵呵,佩服!
uj5u.com熱心網友回復:
asc交換,組合這種招術我也用過,呵呵。
還有一種方法,生成一個50行的文本,用限機機函式生成,然把把你的口令藏在里面
uj5u.com熱心網友回復:
向3樓學習uj5u.com熱心網友回復:
向三樓學習uj5u.com熱心網友回復:
向3樓致敬uj5u.com熱心網友回復:
強大。。。uj5u.com熱心網友回復:
三樓這種耐心且愿意幫人的精神真是要頂一個,對我們這些菜鳥太好了uj5u.com熱心網友回復:
學習 ... 謝謝高手 熱心助人uj5u.com熱心網友回復:
領教!uj5u.com熱心網友回復:
dingding!!!uj5u.com熱心網友回復:
真牛!
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/92192.html
標籤:腳本語言
上一篇:PB中怎么洗掉動態生成的曲線
