Commit d953e396 by BellCodeEditor

save project

parent ae431ff2
Showing with 9 additions and 22 deletions
import random file1=open('C:\\Users\\huawei\\Desktop\\test.txt','w',encoding='utf-8')
l="" file1.write('小兰:12本\n')
# 私钥 file1.write('小强:10本\n')
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!" file1.write('李明:15本\n')
# 要加密语句 file1.close()
message=input("请输入:") with open('C:\\Users\\huawei\\Desktop\\test.txt','r',encoding='utf-8') as file1:
k="@#$%^&*^%#@@!#$%" for data in file1:
for i in message: print(data)
str1=i
str2=random.choice(key)
str3=random.choice(key)
str4=str1+str2+str3
l=l+str4
listy=list(l)
index=random.randint(0,len(listy))
listy.insert(index,listy)
listy.insert(5,k)
m="".join(list)
print(m)
# 请使用私钥key,对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