Commit 393ec1e1 by BellCodeEditor

save project

parent d3f81b0e
Showing with 3 additions and 21 deletions
import random dict_hero={'傻猴':10,'大猴':30,'雷猴':44}
print(dict_hero)
# 私钥 \ No newline at end of file
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
# 要加密语句
message = input("请输入:")
# 请使用私钥key,对message进行加密
key_message="sdfddsg"
for i in message:
s1=i
s2=random.choice(key)
s3=random.choice(key)
text=s1+s2+s3
key_message=key_message+text
list_message=list(key_message)
index=random.randint(0,len(key_message))
list_message.insert(index_message)
result_message="".join(list_message)
print(result_message)
\ 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