Commit 82dc5851 authored by yanzg's avatar yanzg

表结构修改

parent bc4d7ef1
...@@ -5,6 +5,8 @@ import com.yanzuoguang.util.thread.ThreadHelper; ...@@ -5,6 +5,8 @@ import com.yanzuoguang.util.thread.ThreadHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import java.security.PublicKey;
public class TestRsa { public class TestRsa {
@Test @Test
...@@ -28,6 +30,15 @@ public class TestRsa { ...@@ -28,6 +30,15 @@ public class TestRsa {
testRsaPrivateEncode(rsaInfo); testRsaPrivateEncode(rsaInfo);
} }
@Test
public void testAccount() {
String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDP6PNloM90hUD4exz88EKbqPeGhxiQgyMfTNOuMqcQuKp+j7/5jkJ3CuJDGmZfgg9JTGlJ7r/SbSGA6TPFuVdD3vrHyHPxrURTeaKptI6qxCht9LltJtoTnE7mSEhNiGCjA6cZk8fi8SuFghGDO7I3zqYeSsdQK0qAWqwXZwTeRwIDAQAB";
String accountInfo = "F1t4CswQFSfhoTuNUoiO/jOfbuqZTvV8r0U3LxNA7OTb8UY0+Yt9a/R/sWgko4/lrM4ISWHvkZJEuU+szJ6J8vS2hrAZShZ6GER45DcArDVkjTnNeLQvL+eB3uVGUS3hwjG0rWRZjyMsSJJoFmSp8RR3l1bSmcSw2dRoGEpOboo=";
PublicKey key = RsaHelper.getPublicKey(publicKey);
String s = RsaHelper.decryptionByPublicKey(accountInfo, key);
System.out.println(s);
}
private void testRsaPublicEncode(RsaHelper.RsaInfo rsaInfo) { private void testRsaPublicEncode(RsaHelper.RsaInfo rsaInfo) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (int i = 0; i < 50; i++) { for (int i = 0; i < 50; i++) {
......
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 to comment