Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson7_4
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
693b86f5
authored
Mar 28, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
542e7609
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
diy4.py
diy4.py
View file @
693b86f5
...
...
@@ -5,7 +5,7 @@ key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是
# 要加密语句
message
=
"诺依,周末一起去看动漫展吧!"
key_message
=
""
xs
=
"
瓦斯弹哇所多翁多哇所多多哇
"
xs
=
"
11超次元西安下学期安心安心
"
# 请使用私钥key,对message进行加密
for
i
in
message
:
sit1
=
i
...
...
@@ -13,7 +13,8 @@ for i in message:
sit3
=
random
.
choice
(
key
)
sit4
=
sit1
+
sit2
+
sit3
key_message
=
key_message
+
sit4
list1
=
list
(
key_message
)
list1
.
insert
(
3
,
xs
)
list2
=
""
.
join
(
list1
)
print
(
list2
)
inx
=
random
.
randint
(
0
,
len
(
key_message
))
list1
=
list
(
key_message
)
list1
.
insert
(
inx
,
xs
)
key_message
=
""
.
join
(
list1
)
print
(
key_message
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment