Commit e4de0a18 by BellCodeEditor

save project

parent 18891748
Showing with 22 additions and 0 deletions
import random
# 私钥
key = input("请输入私钥")
# 要加密语句
message = input("请输入语句:")
key_message=""
# 请使用私钥key,对message进行加密
for i in message:
a=i
b=random.choice(key)
c=random.choice(key)
key_message=key_message+a+b+c
print(key_message)
d=input("请输入干扰字符")
wc=key_message
h=list(wc)
j=random.randint(0,len(h))
h.insert(j,d)
wc="".join(h)
print(wc)
\ 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