Commit 546d2e2e by BellCodeEditor

save project

parent 2a7fa761
Showing with 0 additions and 20 deletions
import random
# 私钥
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
# 要加密语句
key_message=""
noise="jk;osavijaow "
message =input('需要加密的语句是什么')
for i in message:
star1=i
star2=random.choice(key)
star3=random.choice(key)
text=star1+star2+star3
key_message=key_message + text
list_message=list(key_message)
index=random.randint(0,len(key_message))
list_message.insert(index,noise)
result_message="".join(list_message)
print(result_message)
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