public class RSAHelper extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
RSAHelper.RSAKeyPair |
| 构造器和说明 |
|---|
RSAHelper() |
public static RSAHelper.RSAKeyPair genKeyPair() throws NoSuchAlgorithmException
NoSuchAlgorithmException - epublic static String encrypt(String str, String publicKey)
str - 明文publicKey - 公钥public static String decrypt(String str, String privateKey)
str - 秘文privateKey - 私钥Copyright © 2022. All rights reserved.