Commit 6c0e30ad by BellCodeEditor

save project

parent 884e93ee
Showing with 7 additions and 5 deletions
...@@ -3,7 +3,8 @@ import random ...@@ -3,7 +3,8 @@ import random
# 私钥 # 私钥
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!" key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
# 要加密语句 # 要加密语句
message = "诺依,周末一起去看动漫展吧!" message=input()
n="1234567890"
a="" a=""
for i in message: for i in message:
str1=i str1=i
...@@ -11,8 +12,8 @@ for i in message: ...@@ -11,8 +12,8 @@ for i in message:
str3=random.choice(key) str3=random.choice(key)
ee=str1+str2+str3 ee=str1+str2+str3
a=a+ee a=a+ee
u="1234567890" k=list(a)
k=list(u) c=random.randint(0,len(k))
k.insert(6,u) k.insert(c,n)
c="".join(a) c="".join(k)
print(c) print(c)
\ 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