Commit 1cf2a13c by BellCodeEditor

save project

parent 75c69ea6
Showing with 14 additions and 17 deletions
import random a={'z':2, 'x':1,'c':3}
a1={'z':3, 'x':0.5,'c':3}
# 私钥 a2={'z':2, 'x':1,'c':0.8}
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!" b={'z1':a,'z2':a1,'z3':a2}
# 要加密语句 q=input('minzi:')
message = "诺依,周末一起去看动漫展吧!" print('*'*30)
if q in b:
# 请使用私钥key,对message进行加密 q=b[v]
ab=" " for k,v in b.items():
for i in message: print(k,v)
str1=i print('*'*30)
str2=random.choice(key) else:
str3=random.choice(key) print('cha')
text=str1+str2+str3 \ No newline at end of file
ab=ab+text
print(ab)
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