diff --git a/diy4.py b/diy4.py new file mode 100644 index 0000000..e731d5c --- /dev/null +++ b/diy4.py @@ -0,0 +1,20 @@ +import random + +# 私钥 +key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!" +# 要加密语句 +message = input() +a = "" +# 请使用私钥 key,对message进行加 +noise = "#^^^%$#%$%&$%^Y#$%^#*$%^&#$^@#$!#$^@#%%$%&%^$#^&#" +for i in message: + text = i + str1=random.choice(key) + str2=random.choice(key) + text = text+str1+str2 + a = a + text + +a1 = list(a) +a1.insert(random.randint(0,len(a)),noise) +b="".join(a1) +print(b) \ No newline at end of file