当前位置: 首页 > news >正文

做分销网站系统下载怎么做网站充值网站

做分销网站系统下载,怎么做网站充值网站,湖北省住建厅网站官网,网络营销师考试内容埃特巴什码加解密小程序 这几天在看CTF相关的课程,涉及到古典密码学和近代密码学还有现代密码学。 简单替换密码 Atbash Cipher 埃特巴什码(Atbash Cipher)其实可以视为下面要介绍的简单替换密码的特例,它使用字母表中的最后 一个字母代表第一个字母…

埃特巴什码加解密小程序

这几天在看CTF相关的课程,涉及到古典密码学和近代密码学还有现代密码学。

简单替换密码

Atbash Cipher

埃特巴什码(Atbash Cipher)其实可以视为下面要介绍的简单替换密码的特例,它使用字母表中的最后 一个字母代表第一个字母,倒数第二个字母代表第二个字母。在罗马字母表中,它是这样出现的:

ABCDEFGHIJKLMNOPQRSTUVWXYZ 明码表 
ZYXWVUTSRQPONMLKJIHGFEDCBA 密码表

比如埃 码

明文:the quick brown fox jumps over the lazy dog 
密文:gsv jfrxp yildm ulc qfnkh levi gsv ozab wlt

按照上面的规则,我编了一个小工具。源码如下:

import tkinter as tk
from tkinter import messagebox
code_dict  = {'A': 'Z', 'B': 'Y', 'C': 'X', 'D': 'W', 'E': 'V', 'F': 'U', 'G': 'T', 'H': 'S', 'I': 'R', 'J': 'Q', 'K': 'P', 'L': 'O', 'M': 'N', 'N': 'M', 'O': 'L', 'P': 'K', 'Q': 'J', 'R': 'I', 'S': 'H', 'T': 'G', 'U': 'F', 'V': 'E', 'W': 'D', 'X': 'C', 'Y': 'B', 'Z': 'A'}def encrypt(plaintext):ciphertext = ''for char in plaintext.upper():if char.isalpha():ciphertext += code_dict.get(char, '')else:ciphertext += charreturn ciphertextdef decrypt(ciphertext):plaintext = ''for char in ciphertext.upper():if char.isalpha():for k, v in code_dict.items():if char == v:plaintext += kelse:plaintext += charreturn plaintextclass CaesarCipherGUI:def __init__(self, master):self.master = mastermaster.title("埃特巴什码加解密--微信号强壮Python")# Create a frame to hold the input and output fieldsself.frame = tk.Frame(master)self.frame.pack(fill=tk.BOTH, expand=1)# Create the input fieldself.input_label = tk.Label(self.frame, text="输入信息", anchor='w', justify='left')self.input_label.pack()self.input_entry = tk.Entry(self.frame, width=40, justify='left')self.input_entry.pack()# Create the buttonsself.button_frame = tk.Frame(self.frame)self.button_frame.pack(fill=tk.X)self.encrypt_button = tk.Button(self.button_frame, text="加 密", command=self.encrypt_message)self.encrypt_button.pack(side='left', padx=5)self.decrypt_button = tk.Button(self.button_frame, text="解 密", command=self.decrypt_message)self.decrypt_button.pack(side='left', padx=25)# Create the output fieldself.output_label = tk.Label(self.frame, text="输 出", anchor='w')self.output_label.pack()self.output_text = tk.Text(self.frame, width=52, height=10, wrap='word')self.output_text.pack()def encrypt_message(self):plaintext = self.input_entry.get()ciphertext = encrypt(plaintext).lower()self.output_text.delete('1.0', tk.END)self.output_text.insert('1.0', ciphertext)def decrypt_message(self):ciphertext = self.input_entry.get()plaintext = decrypt(ciphertext).lower()self.output_text.delete('1.0', tk.END)self.output_text.insert('1.0', plaintext)root = tk.Tk()
my_gui = CaesarCipherGUI(root)
root.mainloop()

备注:界面是用AI生成,稍加修改。

运行结果如下图:

Screenshot 2024-06-25 at 22.24.10

http://www.yayakq.cn/news/93273/

相关文章:

  • 如何做网站电话太原网站推广只选中联传媒
  • 简述建设网站的步骤6erp企业管理系统平台
  • 新能源 东莞网站建设重庆智能网站建设费用
  • 如何查询网站是否有做404百度广告搜索引擎
  • wordpress 微博链接地址网站推广专家十年乐云seo
  • 企业的网站公告怎么制作wordpress自定义注册插件
  • 建设电影网站的教程现在有没有免费的网站空间
  • 的建站公司华为云怎么建网站
  • 太平洋手机网郑州seo优化外包顾问阿亮
  • 网站开发工具书中国建设银行北京分行官网站
  • php mysql网站开发实例为什么我的网站做不起来
  • 做外贸a货网站专注昆明网站推广
  • 长沙建设网站企业网站开发个人简介范文
  • 网站平台做推广方案教你如何建设网站
  • 东莞百度seoseo在线工具
  • 网站免费正能量软件下载昆明建站网站资讯平台
  • 单页网站怎么做竞价中国室内设计联盟官网首页
  • 搜房网站建设分析广州建论坛网站
  • dedecms 5.7 关闭网站咪豆建站
  • 大连网站制作信ls15227设计网站建设图片
  • 东莞做网站优化哪家好翔安区建设局网站
  • 百度站长平台删站移动网站怎么建设
  • wordpress 网站制作拐个娇妻做晚餐在哪个网站连载呢
  • 网站开发和app开发哪个难二级目录做网站
  • 厦门网站定制有好的学网站建设的书吗
  • 网站建设毕业设计中期进度报告成都商城网站制作
  • 重庆建设信息网站查询比亚迪唐100使用了哪些网络营销方式
  • cms网站访问人数网站主体负责人和网站负责人
  • 梅州网站建北京微信网站制作电话
  • 福州网页模板建站wordpress 推送公众号