Commit 1a59de29 by BellCodeEditor

auto save

parent 1c197d62
Showing with 17 additions and 18 deletions
import random import random
#密钥
key="okmnjiuhb啊圣诞快乐哈师大是qazsw去哦抛弃我开oqwwuiueeq"
#要加密的句子
juzi="欢迎来到玛酷机器人,我们一起学Python吧!"
# 私钥 #开始加密
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!" key_juzi = ""
# 要加密语句
message = "诺依,周末一起去看动漫展吧!" #加密过程
key_message="" for i in juzi:
# 请使用私钥key,对message进行加密 a = i
for i in range(len(message)): b = random.choice(key)
a=message[i] c = random.choice(key)
b=random.choice(key) new_juzi =a+b+c
c=random.choice(key) key_juzi=key_juzi+new_juzi
d=a+b+c
key_message=key_message+d print(key_juzi)
print(key_message) \ No newline at end of file
message1=list(key_message)
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