Commit 5ffa3238 by BellCodeEditor

save project

parent 18891748
Showing with 36 additions and 0 deletions
import random
a=random.randint(7,9)
print(a)
\ No newline at end of file
import random
# 私钥
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
# 要加密语句
message = "诺依,周末一起去看动漫展吧!"
password="port:@^&($^@O"
# 请使用私钥key,对message进行加密
new_list=''
for i in message:
str1=i
str2=random.choice(key)
str3=random.choice(key)
balabala=str1+str2+str3
new_list += balabala
print(new_list)
mess=list(new_list)
print(mess)
num=random.randint(0,len(mess))
mess.insert(num,"password")
print(mess)
print("".join(mess))
# import random
'''
组合字符串
字符串转化成列表
向列表中插入干扰字符
将加入干扰字符的列表转化成字符串
'''
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