Commit 170d8ceb by BellCodeEditor

save project

parent f8f204bc
Showing with 2 additions and 3 deletions
...@@ -3,7 +3,7 @@ o='' ...@@ -3,7 +3,7 @@ o=''
# 私钥 # 私钥
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!" key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
# 要加密语句 # 要加密语句
message = "诺依,周末一起去看动漫展吧!" message = input("你想加密的内容:")
c='34567dfgh' c='34567dfgh'
# 请使用私钥key,对message进行加密 # 请使用私钥key,对message进行加密
for i in message: for i in message:
...@@ -12,9 +12,8 @@ for i in message: ...@@ -12,9 +12,8 @@ for i in message:
w=random.choice(key) w=random.choice(key)
p=a+q+w p=a+q+w
o=o+p o=o+p
print(o)
g=list(o) g=list(o)
g.insert(2,c) g.insert(random.randint(0,len(g)),c)
j="".join(g) j="".join(g)
print(j) print(j)
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