这个加密解密方法是在”金刀客”的博客里发现的。然后我整理了一下
<% ''' <summary>加密</summary> ''' <param name="getstr">明文</param> ''' <param name="Pos">密钥</param> Function SerinfEn(getstr, Pos) Dim i, newStr For i = 1 To Len(getstr) newStr = newStr & Asc(Mid(getstr, i, 1))+Pos & (298361 - Pos) Next SerinfEn = newStr End Function ''' <summary>解密</summary> ''' <param name="getstr">密文</param> ''' <param name="Pos">密钥</param> Function SerinfDe(getstr, Pos) Dim i, newStr getstr=Replace(getstr,(298361 - Pos),"|") for each key in split(getstr,"|") if key="" then exit for newStr = newStr & Chr((key)-Pos) next SerinfDe = newStr End Function pwd=SerinfEn("abc..",88) Response.Write(pwd&vblf) Response.Write(SerinfDe(pwd,88)&vblf) '298361 可以进行修改。自行配置大于pos 就行 %>
原文地址 :https://www.daokers.com/article/original/2312.html
吉公网安备 22020202000301号