def crypt(source,key):
from itertools import cycle
result=''
temp=cycle(key)
for ch in source:
result=result+chr(ord(ch)^ord(next(temp)))
return result source='Jiangxi Insstitute of Busiess and Technology'
key='zWrite' print('Before Encrypted:'+source)
encrypted=crypt(source,key)
print('After Encrypted:'+encrypted)
decrypted=crypt(encrypted,key)
print('After Decrypted:'+decrypted)
# Before Encrypted:Jiangxi Insstitute of Busiess and Technology
# After Encrypted:0>w;>Z8I6 >E9I ?
# .
# After Decrypted:Jiangxi Insstitute of Busiess and Technology

最新文章

  1. Elasticsearch推荐插件篇(head,sense,marvel)
  2. ionic的scroll的使用出现的问题
  3. [基础常识]阿里云ecs从购买到环境搭建和建站!!(phpstudy一件包)
  4. python 操作消息队列
  5. CentOS学习笔记--SCSI 设备热插拔
  6. RandomAccessFile、FileChannel、MappedByteBuffer读写文件
  7. DBMS_ERRLOG记录DML错误日志(一)
  8. 干净的 ef for Oracle appconfg配置
  9. phoneGap 中修改生成APP的名字
  10. migrate from weblogic to tomcat: directory mapping--reference
  11. [转]关于Chrome不能登录和同步的解决方法
  12. 为net-snmp添加读readTimeTicks
  13. Java版网络爬虫基础(转)
  14. Luogu 1006 传纸条 / NOIP 2008 传纸条(动态规划)
  15. Struts2.3.34+Hibernate 4.x+Spring4.x 整合二部曲之下部曲
  16. (NO.00003)iOS游戏简单的机器人投射游戏成形记(十六)
  17. MySQL主主复制(双主复制)配置过程介绍
  18. h5端呼起摄像头扫描二维码并解析
  19. python基础之 026 包以及包的引入
  20. 唯品会osp简介(转)

热门文章

  1. WebStorm开发工具设置React Native智能提示
  2. Mahout 算法
  3. php 运行linux命令 与 linux下命令行执行php
  4. Gradle 1.12用户指南翻译——第二十五章. Scala 插件
  5. Gradle 1.12用户指南翻译——第四十章. ANTLR 插件
  6. 第一个Polymer应用 - (0)准备工作
  7. 使用Material Design Tint和视图详解
  8. iOS评分功能、APP中打开其他应用程序
  9. Windows2008修改密码策略简单介绍
  10. DB查询分析器访问EXCEL时,要在表名前后加上中括弧或双引号