关键词搜索

源码搜索 ×
×

ASP可逆算法

发布2009-01-07浏览566次

详情内容

ASP可逆算法
unction encrypt(ecode)
  Dim texts
  dim i

  for i=1 to len(ecode)
  texts=texts & chr(asc(mid(ecode,i,1))+i)
  next
        encrypt = texts
  end function
  function decrypt(dcode)
    dim texts
  dim i
  for i=1 to len(dcode)
  texts=texts & chr(asc(mid(dcode,i,1))-i)
  next
  decrypt=texts
  end function
  function mistake(preString)
        Dim texts
        Dim seed
        Dim i,length
        prestring = trim(preString)
      length = len(preString)
      seed = length
      Randomize(length)
      texts = ""
      for i = 1 to length
            seed = int(94*rnd(-asc(mid(preString,i,1))-seed*asc(right(prestring,1)))+32)
            texts = texts & chr(seed) & chr(int(94*rnd(-seed)+32))
      next
  dim dist
  dist=""
  for i = 1 to len(texts)
    if mid(texts,i,1)<>"'"  then
      dist=dist+mid(texts,i,1)
      end if
      next
      mistake = dist
  end function

相关技术文章

点击QQ咨询
开通会员
返回顶部
×
微信扫码支付
微信扫码支付
确定支付下载
请使用微信描二维码支付
×

提示信息

×

选择支付方式

  • 微信支付
  • 支付宝付款
确定支付下载