Commit 6aba7769 by BellCodeEditor

save project

parent 2a2f9d3f
Showing with 17 additions and 12 deletions
...@@ -2,14 +2,20 @@ import random ...@@ -2,14 +2,20 @@ import random
# 私钥 # 私钥
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!" key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
# 要加密语句 # 要加密语句
message ="诺依,周末一起去看动漫展吧!" message = "诺依,周末一起去看动漫展吧!"
# 请使用私钥key,对message进行加密 # 加密后的语句(密文)
for i in range(len(message)): key_message = ""
a=message[i] erci="dwcsoi89d"
b=random.choice(key) # 加密过程
c=random.choice(key) for i in message:
d=a+b+c str1 = i
print(d,end="") str2 = random.choice(key)
e="dvlkv;ef;owf;fcvs/,d" str3 = random.choice(key)
f=list(d) text = str1+str2+str3
d.insert() key_message = key_message + text
\ No newline at end of file print(key_message)
aa=list(key_message)
aa.insert(6,erci)
bb="".join(aa)
print(bb)
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