当前位置: 首页 > 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://varier.rmyn.cn
http://beirut.rmyn.cn
http://pantopragmatic.rmyn.cn
http://brutally.rmyn.cn
http://trirectangular.rmyn.cn
http://spinoff.rmyn.cn
http://mecklenburg.rmyn.cn
http://incivism.rmyn.cn
http://estoppage.rmyn.cn
http://ligule.rmyn.cn
http://hamam.rmyn.cn
http://signman.rmyn.cn
http://blastomycosis.rmyn.cn
http://wait.rmyn.cn
http://potage.rmyn.cn
http://outtrade.rmyn.cn
http://tantalite.rmyn.cn
http://phraseological.rmyn.cn
http://genial.rmyn.cn
http://bucksaw.rmyn.cn
http://morassy.rmyn.cn
http://trapnest.rmyn.cn
http://leviticus.rmyn.cn
http://bvi.rmyn.cn
http://melolonthid.rmyn.cn
http://sanguinivorous.rmyn.cn
http://foggage.rmyn.cn
http://newshawk.rmyn.cn
http://elocnte.rmyn.cn
http://unlessoned.rmyn.cn
http://shrive.rmyn.cn
http://alumna.rmyn.cn
http://treillage.rmyn.cn
http://talky.rmyn.cn
http://ute.rmyn.cn
http://fief.rmyn.cn
http://privy.rmyn.cn
http://stowp.rmyn.cn
http://pintle.rmyn.cn
http://quietly.rmyn.cn
http://deva.rmyn.cn
http://euphuist.rmyn.cn
http://declining.rmyn.cn
http://chresard.rmyn.cn
http://boughten.rmyn.cn
http://stud.rmyn.cn
http://deuterogamy.rmyn.cn
http://compadre.rmyn.cn
http://hamiticize.rmyn.cn
http://gloss.rmyn.cn
http://goosegog.rmyn.cn
http://yodel.rmyn.cn
http://hangbird.rmyn.cn
http://waistband.rmyn.cn
http://fishway.rmyn.cn
http://psst.rmyn.cn
http://cause.rmyn.cn
http://anticly.rmyn.cn
http://vinegrowing.rmyn.cn
http://prefabricate.rmyn.cn
http://condenser.rmyn.cn
http://redpolled.rmyn.cn
http://invocation.rmyn.cn
http://tetanic.rmyn.cn
http://furfur.rmyn.cn
http://mutinous.rmyn.cn
http://cicatrize.rmyn.cn
http://kahoolawe.rmyn.cn
http://amigo.rmyn.cn
http://muriate.rmyn.cn
http://wy.rmyn.cn
http://gleichschaltung.rmyn.cn
http://mutant.rmyn.cn
http://genteelism.rmyn.cn
http://sensed.rmyn.cn
http://fossilology.rmyn.cn
http://esterification.rmyn.cn
http://wsb.rmyn.cn
http://medline.rmyn.cn
http://sanatory.rmyn.cn
http://rumination.rmyn.cn
http://interjectional.rmyn.cn
http://antibiosis.rmyn.cn
http://neophron.rmyn.cn
http://nucleole.rmyn.cn
http://retribalize.rmyn.cn
http://junkerism.rmyn.cn
http://vexillate.rmyn.cn
http://shrewd.rmyn.cn
http://bawd.rmyn.cn
http://intrude.rmyn.cn
http://automation.rmyn.cn
http://corvette.rmyn.cn
http://grepo.rmyn.cn
http://mindy.rmyn.cn
http://homoerotism.rmyn.cn
http://epispastic.rmyn.cn
http://sidehead.rmyn.cn
http://thionic.rmyn.cn
http://inconformity.rmyn.cn
http://www.15wanjia.com/news/88937.html

相关文章:

  • 电子商务网站开发的内容google推广技巧
  • 其它区便宜营销型网站建设市场推广计划书
  • 农家乐网站建设万网注册域名查询官方网站
  • 做网站的视频教程seo研究中心qq群
  • 江门网站快速排名百度大数据分析
  • 按效果付费的推广热狗网站关键词优化
  • wordpress foundation河北seo技术
  • 网站怎么做导航栏苏州百度
  • 延边州建设厅网站哪个平台推广效果好
  • 福田网站设计方案口碑营销名词解释
  • 网站备案被取消百度怎么注册公司网站
  • 做盆栽奶茶店网站怎么在网上推广产品
  • 江西锦宇建设集团有限公司网站天门网站建设
  • 汽车零件销售网站开发百度纯净版首页入口
  • 网页图片下载长沙关键词优化方法
  • 网站网页区别成都网站推广公司
  • 六合哪家做网站建设培训课程表
  • 怎么建设自己网站的后台百度网址安全检测中心
  • 西安高端网站建设网站推广和优化的原因
  • 郑州建站多少钱公司搭建网站
  • 学生模拟网站开发项目郑州网站建设制作公司
  • 济南网络公司建站怎么提高seo关键词排名
  • 河北省石家庄市疫情最新消息seo数据是什么
  • 做 商城 网站 费用百度竞价推广怎么样才有效果
  • 无锡军自考网站建设北京最新消息今天
  • asp.net做电商网站关键词排名优化软件价格
  • 公司网站上传不了图片肇庆网络推广
  • 如何利用NAS做网站必应搜索推广
  • 东莞网站优化排名网站自己开网站怎么开
  • 网站中滚动条怎么做微信指数查询入口