Commit e39c5009 by BellCodeEditor

save project

parent 51755710
Showing with 7 additions and 2 deletions
...@@ -5,6 +5,7 @@ key = "abcdefgh使用编程实现ä½ç§»æ›¿æ¢åŠ å¯†ï¼Œåˆ¶ä½œå¯†ç æœºå…³çœŸæ˜¯å¤ ...@@ -5,6 +5,7 @@ key = "abcdefgh使用编程实现ä½ç§»æ›¿æ¢åŠ å¯†ï¼Œåˆ¶ä½œå¯†ç æœºå…³çœŸæ˜¯å¤
# 要加密语句 # 要加密语句
message = "诺依,周末一起去看动漫展吧!" message = "诺依,周末一起去看动漫展吧!"
key_mes="" key_mes=""
noise="pont:!@#$%^&*()~_+"
# 请使用私钥key,对message进行加密 # 请使用私钥key,对message进行加密
for i in message: for i in message:
str=i str=i
...@@ -12,4 +13,8 @@ for i in message: ...@@ -12,4 +13,8 @@ for i in message:
str2=random.choice(key) str2=random.choice(key)
text=str+str1+str2 text=str+str1+str2
key_mes=key_mes+text key_mes=key_mes+text
print(key_mes)
\ No newline at end of file list_mes=list(key_mes)
list_mes.insert(6,noise)
jieguo_mes="".join(list_mes)
print(jieguo_mes)
\ 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