Commit 26394ccf authored by yanzg's avatar yanzg

修改实体位置

parent 6f5ed441
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<groupId>io.springfox</groupId> <groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId> <artifactId>springfox-swagger2</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
...@@ -4,6 +4,7 @@ import com.yanzuoguang.util.contants.SystemContants; ...@@ -4,6 +4,7 @@ import com.yanzuoguang.util.contants.SystemContants;
import com.yanzuoguang.util.exception.CodeException; import com.yanzuoguang.util.exception.CodeException;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.util.Base64Utils;
import javax.crypto.Cipher; import javax.crypto.Cipher;
import java.security.*; import java.security.*;
...@@ -11,7 +12,6 @@ import java.security.interfaces.RSAPrivateKey; ...@@ -11,7 +12,6 @@ import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey; import java.security.interfaces.RSAPublicKey;
import java.security.spec.PKCS8EncodedKeySpec; import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec; import java.security.spec.X509EncodedKeySpec;
import java.util.Base64;
/** /**
* RSA * RSA
...@@ -186,7 +186,7 @@ public final class RsaHelper { ...@@ -186,7 +186,7 @@ public final class RsaHelper {
* @throws Exception * @throws Exception
*/ */
private static String encodeBase64(byte[] source) throws Exception { private static String encodeBase64(byte[] source) throws Exception {
byte[] to = Base64.getEncoder().encode(source); byte[] to = Base64Utils.encode(source);
return new String(to, SystemContants.UTF8); return new String(to, SystemContants.UTF8);
} }
...@@ -199,6 +199,6 @@ public final class RsaHelper { ...@@ -199,6 +199,6 @@ public final class RsaHelper {
*/ */
private static byte[] decodeBase64(String target) throws Exception { private static byte[] decodeBase64(String target) throws Exception {
byte[] from = target.getBytes(SystemContants.UTF8); byte[] from = target.getBytes(SystemContants.UTF8);
return Base64.getDecoder().decode(from); return Base64Utils.decode(from);
} }
} }
\ 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 to comment