Commit 58461f43 by BellCodeEditor

save project

parent 77bf7cc4
Showing with 7 additions and 2 deletions
...@@ -4,7 +4,8 @@ import random ...@@ -4,7 +4,8 @@ import random
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!" key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
# 要加密语句 # 要加密语句
message = "诺依,周末有起去看 动漫展吧!" message = "诺依,周末有起去看 动漫展吧!"
new="" new=""
ganrao="ju65ty^*$#^gfert"
# 请使用私钥key,对message进行加密 # 请使用私钥key,对message进行加密
for i in message: for i in message:
str1=i str1=i
...@@ -12,5 +13,9 @@ for i in message: ...@@ -12,5 +13,9 @@ for i in message:
str3=random.choice(key) str3=random.choice(key)
text=str1+str2+str3 text=str1+str2+str3
new=new+text new=new+text
print(new) list_new=list(new)
index=random.randint(0,len(new))
list_new.insert(index,ganrao)
result="".join(list_new)
print(result)
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