Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
c5c9feb3
Commit
c5c9feb3
authored
Jul 07, 2023
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表结构修改
parent
4cd0373a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
TestRsa.java
yzg-util-base/src/test/java/helper/TestRsa.java
+13
-0
No files found.
yzg-util-base/src/test/java/helper/TestRsa.java
View file @
c5c9feb3
...
...
@@ -39,6 +39,19 @@ public class TestRsa {
System
.
out
.
println
(
s
);
}
@Test
public
void
testPublicDecode
()
{
String
publicKey
=
"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCaBW3Zwh0oCIOGBHTxn+WrhUzGHb+ZLRXkpU4y6mw7w4tiznYRRPn2BCLs9QqKVIPIx9Z7MPdodqh3uN06aizk7FXx0GSk/F3fP9KvwS/QH+rmYpCR9lxAt3BkJq3sDHkPgkOdFy7lQwFvG7ECN2Tzxa9Usw47rlmBwLyaZxBrYQIDAQAB"
;
String
accountInfo
=
"O28odVeYktCOGlm5dI8lnTcjIDsHdJgDctVomXcWXZM4g6m+mObcTzyerU064NCEIrADPLDF+unm2Ts6I/empwQJIwhlRMo4q6k8eVnuax3GZhkSjadrGXCtli/r0G5l4RcguJAOWcw6GFNeKHfv5hbt6B9swxCRuDpCGeOp50AdwP0b9CQN4+uH/mOCDD5W85t9gaDWL96H6fLR8QQO66TXCs/C7KNzRuJjhIebbi/TLaoTsptFHST0FIXTZLhEj5XhgMYNqujxoMbC53Kb4PhBGDYdoVXgtnRjiRcFByZKZ6DMcN3fll+4R6OxMNDUKTJ9TqM0AlTyx01SMea89Q=="
;
PublicKey
key
=
RsaHelper
.
getPublicKey
(
publicKey
);
String
s
=
RsaHelper
.
decryptionByPublicKey
(
accountInfo
,
key
);
System
.
out
.
println
(
s
);
}
private
void
testRsaPublicEncode
(
RsaHelper
.
RsaInfo
rsaInfo
)
{
StringBuilder
sb
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
50
;
i
++)
{
...
...
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