Commit 8d100e32 by BellCodeEditor

auto save

parent 21cb3b30
Showing with 7 additions and 2 deletions
...@@ -2,6 +2,7 @@ import random ...@@ -2,6 +2,7 @@ import random
# 私钥 # 私钥
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!" key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
key2='!@#$%^&*(dahgdudhd!@#$%^&hsgwc&^6w5rgedhw4cut29849)_(*^$#nckjfdh@#%^&)'
# 要加密语句 # 要加密语句
message = "诺依,周末一起去看动漫展吧!" message = "诺依,周末一起去看动漫展吧!"
...@@ -12,4 +13,8 @@ for i in message: ...@@ -12,4 +13,8 @@ for i in message:
str2=random.choice(key) str2=random.choice(key)
str3=random.choice(key) str3=random.choice(key)
str1+=f'{str2}{str3}' str1+=f'{str2}{str3}'
print(str1) lst=list(str1)
\ No newline at end of file idx=random.randint(0,len(lst))
lst.insert(idx,key2)
r=''.join(lst)
print(r)
\ 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