mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-05-09 04:25:54 +08:00
快照
This commit is contained in:
@@ -81,6 +81,6 @@ public class RSA2 {
|
||||
|
||||
|
||||
public static String encrypt(String content, String publicKey, String cipherAlgorithm, String characterEncoding ) throws Exception {
|
||||
return new String(Base64.getDecoder().decode(RSA.encrypt(content.getBytes(Charset.forName(characterEncoding)), RSA.getPublicKey(publicKey), 2048, 11, cipherAlgorithm)), characterEncoding);
|
||||
return Base64.encode(RSA.encrypt(content.getBytes(Charset.forName(characterEncoding)), RSA.getPublicKey(publicKey), 2048, 11, cipherAlgorithm));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user