Commit 51e6c5cc by BellCodeEditor

save project

parent e3160ea5
Showing with 30 additions and 0 deletions
# 加密
import random
k=""
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
message = input("xvxvxvxvxvxvxvxvcxvxv")
a = "@!#$#$@&@dj&aaj%sh*%*sa#)"
for i in message:
str1=i+random.choice(key)+random.choice(key)
k=k+str1
li_k=list(k)
n = random.randint(0,len(k))
li_k.insert(n,a)
print("".join(li_k))
print(li_k)
# 解密
jie = ""
li_k.pop(n)
print(li_k)
for i in range(0,len(li_k),3):
jie=jie+li_k[i]
print(jie)
\ 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