Commit 309c4a68 by BellCodeEditor

save project

parent 084211c3
Showing with 12 additions and 10 deletions
...@@ -5,21 +5,23 @@ key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是 ...@@ -5,21 +5,23 @@ key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是
# 要加密语句 # 要加密语句
message = "诺依,周末一起去看动漫展吧!" message = "诺依,周末一起去看动漫展吧!"
key_message="" key_message=""
a=port:@#$%^& a="port:@#$%^&"
for i in message: for i in message:
str=i str=i
str1=random.choices(key) str1=random.choice(key)
str2=random.choices(key) str2=random.choice(key)
test=str+str1+str2 test=str+str1+str2
key_message=key_message+test key_message=key_message+test
print(key_message) list=list(key_message)
list=list(message) i=random.randint(0,len(key_message))
i=random.randint(a,len(key_message))
list.insert(i,a) list.insert(i,a)
test="".join(list)
""join(message) print(test)
# 请使用私钥key,对message进行加密 # 请使用私钥key,对message进行加密
#list=list(message)
##i=random.randint(a,len(key_message))
#list.insert(i,a)
#test="".join(list)
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