|
下面是官方的加密解密工具。。。请问有具体例子吗
#include <String.au3>
Func crypt($t, $pw, $type);文本,密码,0<strong><font color="#FF0000">加密</font></strong>1解密
If $type = 1 Then $t = _HexToString($t)
$Terug = ""
$pwlen = StringLen($pw)
$textlen = StringLen($t)
Dim $text[$textlen + 1]
For $z = 1 To $pwlen
For $i = 1 To $textlen
$text[$i] = Hex(BitXOR(Asc(StringMid($t, $i, 1)), Asc(StringMid($pw, $z, 1))), 2)
Next
Next
For $i = 1 To UBound($text) - 1
If $type = 1 Then $Terug &= Chr(Dec($text[$i]))
If $type <> 1 Then $Terug &= $text[$i]
Next
Return $Terug
EndFunc ;==>crypt |
|