Commit 559bc01a by BellCodeEditor

save project

parent f9ad9280
Showing with 6 additions and 7 deletions
import random import random
QQ="te*fy2b#%"
# 私钥
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!" key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
# 要加密语句
message = "SB,周末一起去看动漫展吧!" message = "SB,周末一起去看动漫展吧!"
# 请使用私钥key,对message进行加密
res="" res=""
for i in message: for i in message:
str1=i str1=i
...@@ -14,5 +9,8 @@ for i in message: ...@@ -14,5 +9,8 @@ for i in message:
str3=random.choice(key) str3=random.choice(key)
text=str1+str2+str3 text=str1+str2+str3
res+=text res+=text
res=list(res)
index=4
res.insert(index,QQ)
res="".join(res)
print(res) print(res)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment