Commit fc7741dc by BellCodeEditor

save project

parent ea2cf72c
Showing with 18 additions and 4 deletions
import random
# 私钥
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
new=""
key = "abcefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
# 要加密语句
message = "诺依,周末一起去看动漫展吧!"
# 请使用私钥key,对message进行加密
key1="d@!$%$%$^^"
for i in message:
ws=i
wa=random.choice(key)
wd=random.choice(key)
wf=ws+wa+wd
new=new+wf
new=list(new)
new.insert(random.randint(0,len(new)),key1)
c="".join(new)
print(c)
print('解密')
g=list(c)
for i in key1:
g="".join(g)
print(g)
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