Commit b170fb47 by BellCodeEditor

save project

parent 18891748
Showing with 18 additions and 0 deletions
import random
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
message = input("请输入要加密的语句:")
key2 = "@$%^&*"
text = ""
for c in message:
str1 = c
str2 = random.choice(key)
str3 = random.choice(key)
key_message = str1+str2+str3
text=text+key_message
li_text = list(text)
num = random.randint(0,len(message))
li_text.insert(num,key2)
text = "".join(li_text)
print(text)
\ 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