Commit 6493be43 by BellCodeEditor

auto save

parent 3058d229
Showing with 35 additions and 18 deletions
import random import turtle
p=turtle.Pen()
p.up()
p.goto(-100,-100)
p.down()
for i in range(4):
p.fd(225)
p.left(90)
p.up()
p.goto(-50,0)
p.down()
p.begin_fill()
p.circle(10,360)
p.up()
p.goto(10,0)
p.down()
p.fillcolor("red")
p.end_fill()
# 私钥 p.begin_fill()
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!" p.circle(10,360)
# 要加密语句 p.up()
N="^*" p.goto(70,0)
k="" p.down()
message = "诺依,周末一起去看动漫展吧!" p.fillcolor("red")
for i in message: p.end_fill()
s1=i
s2=random.choice(key)
s3=random.choice(key)
t=s1+s2+s3
k=k+t
# 请使用私钥key,对message进行加密
l=list(k)
l.insert(5,N)
R="".join(l)
print(R)
p.begin_fill()
p.circle(10,360)
p.up()
p.goto(130,0)
p.down()
p.fillcolor("red")
p.end_fill()
p.hideturtle()
turtle.done()
\ 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