Commit cc0e7022 by BellCodeEditor

save project

parent 6fb75382
Showing with 3 additions and 24 deletions
import random dist_hero={'侯三':10,'后羿':21,'后五':22,'侯队长':29,'后期':30}
#私钥 ptint(dist_hero)
key = "rtrtrtrttrrtrtrttrtrttrrtrttrtrtr" \ No newline at end of file
#要加密语句
message = "诺依,周末一起去看动漫展吧!"
#加密后的语句(密文)
key_message =""
noise="gfvbdisofgvrg"
#加密过程
for i in message:
str1=i
str2=random.choice(key)
str3=random.choice(key)
text=str1+str2+str3
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