#标准当铺密码加密解密, 空格分割 code= "田由中人工大王夫井羊".decode('utf-8') split = "" def encode(s): S = s.decode('utf-8') buff = "" if len(s) > 0: for c in s: str1 = str(ord(c)) for st in str1: buff += code[int(st)] buff += split return buff def decode(s): s = s.decode( 'utf-8') buff = "" temp = "" if len(s) > 0: stringList = s.split(split) for s1 in stringList: for s2 in s1: index = code.find(s2) if index>-1: temp += str(index) buff += chr(int(temp)) temp = '' return buff
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论