Commit 58538a30 by BellCodeEditor

save project

parent 18891748
Showing with 46 additions and 0 deletions
import random
# 私钥
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
message=input("请输入您要加密的语句或密文:")
text=""
c="$%^&%%^%####***!!"
vac="$%^&%%^%####***!!"
va="$%^&%%^%####***!!"
ac="$%^&%%^%####***!!"
aaa=[1,2,3,4,5,6,7,8,9,10,11]
for a in message:
str1=random.choice(key)
str2=random.choice(key)
text=text+a+str1+str2
text1=list(text)
# abc=random.choice(aaa)
# ac=random.choice(aaa)
# bc=random.choice(aaa)
# text1.insert(abc,vac)
# text1.insert(ac,vac)
# text1.insert(bc,vac)
text1.insert(random.randint(0,len(text1)),vac)
all="".join(text1)
print(all)
\ No newline at end of file
import random
# 私钥
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
# 要加密语句
message = "诺依,周末一起去看动漫展吧!"
key_message=""
# 请使用私钥key,对message进行加密
for i in range(len(message)):
a=message[i]
b=random.choice(key)
c=random.choice(key)
d=a+b+c
key_message=key_key_messagemessage+d
print(key_message)
message1=list()
message1.insert(random.randint(0,len(message1)),"¥%……&*$%_*^&%(%^")
message2="".join(message1)
print(message2)
\ 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