Commit 112f4a4b by BellCodeEditor

save project

parent bbec1a6d
Showing with 7 additions and 6 deletions
...@@ -2,9 +2,9 @@ import random ...@@ -2,9 +2,9 @@ import random
# 私钥 # 私钥
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!" key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
sb = "port:#@$%^&"
# 要加密语句 # 要加密语句
message = "诺依,周末一起去看动漫展吧!" message = "诺依,周末一起去看动漫展吧!"
ba = "port:@#$%^&"
key_message = "" key_message = ""
for i in message: for i in message:
# 请使用私钥key,对message进行加密 # 请使用私钥key,对message进行加密
...@@ -13,7 +13,8 @@ for i in message: ...@@ -13,7 +13,8 @@ for i in message:
str3=random.choice(key) str3=random.choice(key)
text=str1+str2+str3 text=str1+str2+str3
key_message=key_message+text key_message=key_message+text
li_key_message=list(key_message) sb=key_message
#list.insert(sb,5) li_sb=list(sb)
message="".join() li_sb.insert(5,ba)
print(key_message) baba="".join(li_sb)
\ No newline at end of file print(baba)
\ 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