Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson7_6
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
e9c6e760
authored
Jun 11, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
66a18440
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
diy4.py
diy4.py
View file @
e9c6e760
import
random
import
random
lm
=
"jgnnvfghbhbhgfbhghvbjghbhjgbhgfhbfbbhbhggjbhfdhbfhdbhjgfghjgfbhgbhbfjdbgjbvhfgbvhbgfhvbhdbvhjgfbvhfdhvbgfdbhdfbhjfgjhjhbnksfbnjhjnsjnsibgbvfnibffsnkbnkfdjvbifkbvhfdvbhbfhdvbhdfbvbhdhsbjvsbufbusdybvhfdbvhhbfhjvfbshyvubgsbhvhbshrtbgvhsbbfc"
lm
=
"vhfdbvhht86rrT.ljy0[bgvhsbbfc"
a
=
""
a
=
""
l
=
""
l
=
""
# 私钥
# 私钥
key
=
"abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
key
=
"abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
# 要加密语句
# 要加密语句 .
message
=
input
()
message
=
input
(
"请输入秘密指令,我们将加密后发出,以确保保密!"
)
# 请使用私钥key,对message进行加密
# 请使用私钥key,对message进行加密
for
i
in
message
:
for
i
in
message
:
str1
=
i
str1
=
i
str2
=
random
.
choice
(
key
)
str2
=
random
.
choice
(
key
)
str3
=
random
.
choice
(
key
)
str3
=
random
.
choice
(
key
)
a
=
str1
+
str2
+
str3
a
=
str1
+
str2
+
str3
l
=
l
+
a
l
=
l
+
a
s
=
list
(
l
)
s
=
list
(
l
)
s
.
insert
(
random
.
randint
(
0
,
len
(
s
),
lm
)
#s[0]="."
#s[1]="g"
#s[2]="编"
s
.
insert
(
random
.
randint
(
0
,
len
(
s
)),
lm
)
s3
=
""
.
join
(
s
)
s3
=
""
.
join
(
s
)
print
(
s3
)
print
(
s3
)
\ 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