Java 第三方java rsa 公钥加密 RSA加密求助

18:03 提问
关于java自带RSA密钥包生成的私钥公钥加密不了,求大神帮忙看一下
我用JAVA生成了一个公钥如下:
System.out.println(publicKey.getPublicKey());
输出:modulus:830
public exponent: 65537
用这个modulus的值加密不了,我看网上的公钥都是这样子的5q4F3crOuN4OG68Dko7EZl5wYn+FokohvMm6m/NFmMJIGBhYnJ9/8JKQMxndka8GafQ9BU/LASFtvbrfNsyA6TfP2wMalewfWF0GBT5AviGouGqt9I9BMrvBfTttU5OMqD2rF+fQ23WMTi+UYzY/9kZB7Rys7A1oIFWnsnB0Jnc=AQAB
请问这个modulus是不是要转换一下 怎么转换呢?有没懂的大神帮下忙
按赞数排序
模加密是:BigInteger n=pbk.getModulus();
System.out.println("e= "+e);
System.out.println("n= "+n);
byte ptext[]=s.getBytes("UTF8");
BigInteger m=new BigInteger(ptext);
// 计算密文c,打印
BigInteger c=m.modPow(e,n);
System.out.println("c= "+c);
下面的格式是Base64格式的:
RSAPublicKey pbk=(RSAPublicKey) x509.getPublicKey();
System.out.println(Base64.encode(pbk.getEncoded()));
其他相似问题JAVA写RSA加密,公钥私钥都是一样的,为什么每次加密的结果不一样? - 知乎11被浏览4190分享邀请回答41 条评论分享收藏感谢收起问题对人有帮助,内容完整,我也想知道答案
问题没有实际价值,缺少关键内容,没有改进余地
大神们好,我现在要用java连接.net下的一个web service,由于要对数据加密,所以使用了rsa加密方法;但是.net和java下面的rsa加密公钥个私钥格式都不一样,所以就产生了一个格式转换的问题;.net下的公钥格式为xml的
现在要把java生成的公钥传给.net,然后.net端用这个公钥进行加密,加密后的数据返回给java,java对这个数据用私钥解密;
ps:现在从.net传一个xml格式的公钥,java端进行解析xml,生成java格式的公钥,然后对其加密,加密后的数据传给了.net端,而.net端能够使用私钥解密。但是就如问题所说的,反过来在java端解密的时候一直报错;
我根据.net端的xml格式公钥生成java端的公钥的代码如下:
public static RSAPublicKey getPublicKey(String modulus, String exponent) {
System.out.println(modulus);
byte[] modulusI = decryptBASE64(modulus);
byte[] expI = decryptBASE64(exponent);
BigInteger b1 = new BigInteger(modulusI);
BigInteger b2 = new BigInteger(expI);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
RSAPublicKeySpec keySpec = new RSAPublicKeySpec(b1, b2);
RSAPublicKey publickey =(RSAPublicKey) keyFactory.generatePublic(keySpec);
} catch (Exception e) {
e.printStackTrace();
根据java端的公钥生成.net端格式的公钥的代码如下:
KeyPairGenerator keyPairGen = KeyPairGenerator
.getInstance(ALGORITHM);
keyPairGen.initialize(512);
KeyPair keyPair = keyPairGen.generateKeyPair();
RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate();
String modulus = encryptBASE64(privateKey.getModulus()
.toByteArray());
String exponent = encryptBASE64(privateKey.getPrivateExponent()
.toByteArray());
String modulusP = encryptBASE64(publicKey.getModulus()
.toByteArray());
String exponentP = encryptBASE64(publicKey.getPublicExponent()
.toByteArray());
m_default_privateKey = ("&RSAKeyValue&&Modulus&" + modulus
+ "&/Modulus&" + "&Exponent&" + exponent
+ "&/Exponent&&/RSAKeyValue&").replace("\r\n", "");
m_default_publicKey = ("&RSAKeyValue&&Modulus&" + modulusP
+ "&/Modulus&" + "&Exponent&" + exponentP
+ "&/Exponent&&/RSAKeyValue&").replace("\r\n", "");
default_privateKeyC = encryptBASE64(privateKey.getEncoded());
default_publicKeyC = encryptBASE64(publicKey.getEncoded());// (
} catch (Exception ex) {
ex.printStackTrace();
答案对人有帮助,有参考价值
答案没帮助,是错误的答案,答非所问
分享到微博?
Hi,欢迎来到 SegmentFault 技术社区!⊙▽⊙ 在这里,你可以提出编程相关的疑惑,关注感兴趣的问题,对认可的回答投赞同票;大家会帮你解决编程的问题,和你探讨技术更新,为你的回答投上赞同票。
明天提醒我
关闭理由:
删除理由:
忽略理由:
推广(招聘、广告、SEO 等)方面的内容
与已有问题重复(请编辑该提问指向已有相同问题)
答非所问,不符合答题要求
宜作评论而非答案
带有人身攻击、辱骂、仇恨等违反条款的内容
无法获得确切结果的问题
非开发直接相关的问题
非技术提问的讨论型问题
其他原因(请补充说明)
我要该,理由是:
扫扫下载 App57261人阅读
安全防御(18)
源码解析(4)
1. 加密的系统不要具备解密的功能,否则 RSA 可能不太合适公钥加密,私钥解密。加密的系统和解密的系统分开部署,加密的系统不应该同时具备解密的功能,这样即使黑客攻破了加密系统,他拿到的也只是一堆无法破解的密文数据。否则的话,你就要考虑你的场景是否有必要用 RSA 了。2. 可以通过修改生成密钥的长度来调整密文长度生成密文的长度等于密钥长度。密钥长度越大,生成密文的长度也就越大,加密的速度也就越慢,而密文也就越难被破解掉。著名的&安全和效率总是一把双刃剑&定律,在这里展现的淋漓尽致。我们必须通过定义密钥的长度在&安全&和&加解密效率&之间做出一个平衡的选择。3. 生成密文的长度和明文长度无关,但明文长度不能超过密钥长度不管明文长度是多少,RSA 生成的密文长度总是固定的。但是明文长度不能超过密钥长度。比如 Java 默认的 RSA 加密实现不允许明文长度超过密钥长度减去 11(单位是字节,也就是 byte)。也就是说,如果我们定义的密钥(我们可以通过 java.security.KeyPairGenerator.initialize(int keysize) 来定义密钥长度)长度为 1024(单位是位,也就是 bit),生成的密钥长度就是 1024位 / 8位/字节 = 128字节,那么我们需要加密的明文长度不能超过 128字节 -11 字节 = 117字节。也就是说,我们最大能将 117 字节长度的明文进行加密,否则会出问题(抛诸如 javax.crypto.IllegalBlockSizeException: Data must not be longer than 53 bytes 的异常)。而 BC 提供的加密算法能够支持到的 RSA 明文长度最长为密钥长度。4. byte[].toString() 返回的实际上是内存地址,不是将数组的实际内容转换为 String警惕 toString 陷阱:Java 中数组的 toString() 方法返回的并非数组内容,它返回的实际上是数组存储元素的类型以及数组在内存的位置的一个标识。大部分人跌入这个误区而不自知,包括一些写了多年 Java 的老鸟。比如这篇博客《》中的代码public class TestByte
public static void main(String[] argv) {
String example = &This is an example&;
byte[] bytes = example.getBytes();
System.out.println(&Text : & + example);
System.out.println(&Text [Byte Format] : & + bytes);
System.out.println(&Text [Byte Format] : & + bytes.toString());
String s = new String(bytes);
System.out.println(&Text Decryted : & + s);
}输出:Text : This is an exampleText [Byte Format] : [B@187aecaText [Byte Format] : [B@187aecaText Decryted : This is an example以及这篇博客《》中的代码final byte[] cipherText = encrypt(originalText, publicKey);
System.out.println(&Encrypted: & +cipherText.toString());输出:[B@4c3a8ea3这些输出其实都是字节数组在内存的位置的一个标识,而不是作者所认为的字节数组转换成的字符串内容。如果我们对密钥以 byte[].toString() 进行持久化存储或者和其他一些字符串打 json 传输,那么密钥的解密者得到的将只是一串毫无意义的字符,当他解码的时候很可能会遇到 &javax.crypto.BadPaddingException& 异常。5. 字符串用以保存文本信息,字节数组用以保存二进制数据java.lang.String 保存明文,byte 数组保存二进制密文,在 java.lang.String 和 byte[] 之间不应该具备互相转换。如果你确实必须得使用 java.lang.String 来持有这些二进制数据的话,最安全的方式是使用 Base64(推荐 Apache 的 commons-codec 库的 mons.codec.binary.Base64):
// use String to hold cipher binary data
Base64 base64 = new Base64();
String cipherTextBase64 = base64.encodeToString(cipherText);
// get cipher binary data back from String
byte[] cipherTextArray = base64.decode(cipherTextBase64);6. 每次生成的密文都不一致证明你选用的加密算法很安全一个优秀的加密必须每次生成的密文都不一致,即使每次你的明文一样、使用同一个公钥。因为这样才能把明文信息更安全地隐藏起来。Java 默认的 RSA 实现是 &RSA/None/PKCS1Padding&(比如 Cipher cipher = Cipher.getInstance(&RSA&);句,这个 Cipher 生成的密文总是不一致的),Bouncy Castle 的默认 RSA 实现是 &RSA/None/NoPadding&。为什么 Java 默认的 RSA 实现每次生成的密文都不一致呢,即使每次使用同一个明文、同一个公钥?这是因为 RSA 的 PKCS #1 padding 方案在加密前对明文信息进行了随机数填充。你可以使用以下办法让同一个明文、同一个公钥每次生成同一个密文,但是你必须意识到你这么做付出的代价是什么。比如,你可能使用 RSA 来加密传输,但是由于你的同一明文每次生成的同一密文,攻击者能够据此识别到同一个信息都是何时被发送。Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
final Cipher cipher = Cipher.getInstance(&RSA/None/NoPadding&, &BC&);7. 可以通过调整算法提供者来减小密文长度Java 默认的 RSA 实现 &RSA/None/PKCS1Padding& 要求最小密钥长度为 512 位(否则会报 java.security.InvalidParameterException: RSA keys must be at least 512 bits long 异常),也就是说生成的密钥、密文长度最小为 64 个字节。如果你还嫌大,可以通过调整算法提供者来减小密文长度:Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
final KeyPairGenerator keyGen = KeyPairGenerator.getInstance(&RSA&, &BC&);
keyGen.initialize(128);如此这般得到的密文长度为 128 位(16 个字节)。但是这么干之前请先回顾一下本文第 2 点所述。8.&Cipher 是有状态的,而且是线程不安全的javax.crypto.Cipher 是有状态的,不要把&Cipher 当做一个静态变量,除非你的程序是单线程的,也就是说你能够保证同一时刻只有一个线程在调用 Cipher。否则你可能会像笔者似的遇到&java.lang.ArrayIndexOutOfBoundsException: too much data for RSA block 异常。遇见这个异常,你需要先确定你给&Cipher 加密的明文(或者需要解密的密文)是否过长;排除掉明文(或者密文)过长的情况,你需要考虑是不是你的&Cipher 线程不安全了。后记虽然《》存在一些认识上的误区,但笔者仍然认为它是一篇很不错的入门级文章。结合本文所列内容,笔者将其代码做了一些调整以供参考:import java.io.F
import java.io.FileInputS
import java.io.FileNotFoundE
import java.io.FileOutputS
import java.io.IOE
import java.io.ObjectInputS
import java.io.ObjectOutputS
import java.security.KeyP
import java.security.KeyPairG
import java.security.NoSuchAlgorithmE
import java.security.PrivateK
import java.security.PublicK
import java.security.S
import javax.crypto.C
import mons.codec.binary.Base64;
* @author JavaDigest
public class EncryptionUtil {
* String to hold name of the encryption algorithm.
public static final String ALGORITHM = &RSA&;
* String to hold name of the encryption padding.
public static final String PADDING = &RSA/NONE/NoPadding&;
* String to hold name of the security provider.
public static final String PROVIDER = &BC&;
* String to hold the name of the private key file.
public static final String PRIVATE_KEY_FILE = &e:/defonds/work//private.key&;
* String to hold name of the public key file.
public static final String PUBLIC_KEY_FILE = &e:/defonds/work//public.key&;
* Generate key which contains a pair of private and public key using 1024
* bytes. Store the set of keys in Prvate.key and Public.key files.
* @throws NoSuchAlgorithmException
* @throws IOException
* @throws FileNotFoundException
public static void generateKey() {
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
final KeyPairGenerator keyGen = KeyPairGenerator.getInstance(
ALGORITHM, PROVIDER);
keyGen.initialize(256);
final KeyPair key = keyGen.generateKeyPair();
File privateKeyFile = new File(PRIVATE_KEY_FILE);
File publicKeyFile = new File(PUBLIC_KEY_FILE);
// Create files to store public and private key
if (privateKeyFile.getParentFile() != null) {
privateKeyFile.getParentFile().mkdirs();
privateKeyFile.createNewFile();
if (publicKeyFile.getParentFile() != null) {
publicKeyFile.getParentFile().mkdirs();
publicKeyFile.createNewFile();
// Saving the Public key in a file
ObjectOutputStream publicKeyOS = new ObjectOutputStream(
new FileOutputStream(publicKeyFile));
publicKeyOS.writeObject(key.getPublic());
publicKeyOS.close();
// Saving the Private key in a file
ObjectOutputStream privateKeyOS = new ObjectOutputStream(
new FileOutputStream(privateKeyFile));
privateKeyOS.writeObject(key.getPrivate());
privateKeyOS.close();
} catch (Exception e) {
e.printStackTrace();
* The method checks if the pair of public and private key has been
* generated.
* @return flag indicating if the pair of keys were generated.
public static boolean areKeysPresent() {
File privateKey = new File(PRIVATE_KEY_FILE);
File publicKey = new File(PUBLIC_KEY_FILE);
if (privateKey.exists() && publicKey.exists()) {
* Encrypt the plain text using public key.
* @param text
: original plain text
* @param key
:The public key
* @return Encrypted text
* @throws java.lang.Exception
public static byte[] encrypt(String text, PublicKey key) {
byte[] cipherText =
// get an RSA cipher object and print the provider
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
final Cipher cipher = Cipher.getInstance(PADDING, PROVIDER);
// encrypt the plain text using the public key
cipher.init(Cipher.ENCRYPT_MODE, key);
cipherText = cipher.doFinal(text.getBytes());
} catch (Exception e) {
e.printStackTrace();
return cipherT
* Decrypt text using private key.
* @param text
:encrypted text
* @param key
:The private key
* @return plain text
* @throws java.lang.Exception
public static String decrypt(byte[] text, PrivateKey key) {
byte[] dectyptedText =
// get an RSA cipher object and print the provider
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
final Cipher cipher = Cipher.getInstance(PADDING, PROVIDER);
// decrypt the text using the private key
cipher.init(Cipher.DECRYPT_MODE, key);
dectyptedText = cipher.doFinal(text);
} catch (Exception ex) {
ex.printStackTrace();
return new String(dectyptedText);
* Test the EncryptionUtil
public static void main(String[] args) {
// Check if the pair of keys are present else generate those.
if (!areKeysPresent()) {
// Method generates a pair of keys using the RSA algorithm and
// stores it
// in their respective files
generateKey();
final String originalText = &&;
ObjectInputStream inputStream =
// Encrypt the string using the public key
inputStream = new ObjectInputStream(new FileInputStream(
PUBLIC_KEY_FILE));
final PublicKey publicKey = (PublicKey) inputStream.readObject();
final byte[] cipherText = encrypt(originalText, publicKey);
// use String to hold cipher binary data
Base64 base64 = new Base64();
String cipherTextBase64 = base64.encodeToString(cipherText);
// get cipher binary data back from String
byte[] cipherTextArray = base64.decode(cipherTextBase64);
// Decrypt the cipher text using the private key.
inputStream = new ObjectInputStream(new FileInputStream(
PRIVATE_KEY_FILE));
final PrivateKey privateKey = (PrivateKey) inputStream.readObject();
final String plainText = decrypt(cipherTextArray, privateKey);
// Printing the Original, Encrypted and Decrypted Text
System.out.println(&Original=& + originalText);
System.out.println(&Encrypted=& + cipherTextBase64);
System.out.println(&Decrypted=& + plainText);
} catch (Exception e) {
e.printStackTrace();
}先生成一对密钥,供以后加解密使用(不需要每次加解密都生成一个密钥),密钥长度为 256 位,也就是说生成密文长度都是 32 字节的,支持加密最大长度为 32 字节的明文,因为使用了 nopadding 所以对于同一密钥同一明文,本文总是生成一样的密文;然后使用生成的公钥对你提供的明文信息进行加密,生成 32 字节二进制明文,然后使用 Base64 将二进制密文转换为字符串保存;之后演示了如何把 Base64 字符串转换回二进制密文;最后把二进制密文转换成加密前的明文。以上程序输出如下:Original=Encrypted=GTyX3nLO9vseMJ+RB/dNrZp9XEHCzFkHpgtaZKa8aCc=Decrypted=参考资料
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:4205861次
积分:34669
积分:34669
排名:第126名
原创:240篇
转载:35篇
译文:155篇
评论:1455条
(6)(4)(5)(5)(5)(6)(5)(1)(3)(2)(2)(3)(2)(2)(1)(1)(1)(1)(3)(7)(4)(3)(5)(10)(10)(2)(2)(5)(3)(4)(4)(7)(4)(2)(1)(1)(6)(6)(4)(3)(4)(2)(21)(10)(3)(3)(5)(4)(1)(1)(3)(5)(3)(1)(1)(1)(1)(1)(3)(5)(15)(10)(1)(1)(2)(1)(2)(4)(3)(2)(1)(2)(1)(1)(1)(1)(3)(1)(1)(1)(1)(5)(3)(3)(1)(4)(1)(3)(11)(7)(7)(13)(7)(8)(1)(4)(6)(14)(16)(25)(1)(1)(1)(1)(1)(1)(1)&&&&&&正文
Java RSA 加解密
摘要:Java RSA 加解密
import java.security.Kimport java.security.KeyFimport java.security.KeyPimport java.security.KeyPairGimport java.security.PrivateKimport java.security.PublicKimport java.security.interfaces.RSAPrivateKimport java.security.interfaces.RSAPublicKimport java.security.spec.PKCS8EncodedKeySimport java.security.spec.X509EncodedKeySimport javax.crypto.Cimport sun.misc.BASE64Dimport sun.misc.BASE64Epublic class RSAHelper
& & &/** & & & * 得到公钥 & & & * @param key 密钥字符串(经过base64编码) & & & * @throws Exception & & & */ & & &public static PublicKey getPublicKey(String key) throws Exception { & & & & & &byte[] keyB & & & & & &keyBytes = (new BASE64Decoder()).decodeBuffer(key);
& & & & & &X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes); & & & & & &KeyFactory keyFactory = KeyFactory.getInstance(&RSA&); & & & & & &PublicKey publicKey = keyFactory.generatePublic(keySpec); & & & & & &return publicK & & &} & & &/** & & & * 得到私钥 & & & * @param key 密钥字符串(经过base64编码) & & & * @throws Exception & & & */ & & &public static PrivateKey getPrivateKey(String key) throws Exception { & & & & & &byte[] keyB & & & & & &keyBytes = (new BASE64Decoder()).decodeBuffer(key);
& & & & & &PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(keyBytes); & & & & & &KeyFactory keyFactory = KeyFactory.getInstance(&RSA&); & & & & & &PrivateKey privateKey = keyFactory.generatePrivate(keySpec); & & & & & &return privateK & & &}
& & &/** & & & * 得到密钥字符串(经过base64编码) & & & * @return & & & */ & & &public static String getKeyString(Key key) throws Exception { & & & & & &byte[] keyBytes = key.getEncoded(); & & & & & &String s = (new BASE64Encoder()).encode(keyBytes); & & & & & & & & &} & & &public static void main(String[] args) throws Exception {
& & & & & &KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance(&RSA&); & & & & & &//密钥位数 & & & & & &keyPairGen.initialize(1024); & & & & & &//密钥对 & & & & & &KeyPair keyPair = keyPairGen.generateKeyPair(); & & & & & &// 公钥 & & & & & &PublicKey publicKey = (RSAPublicKey) keyPair.getPublic(); & & & & & &// 私钥 & & & & & &PrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate(); & & & & & &String publicKeyString = getKeyString(publicKey); & & & & & &System.out.println(&public:\n& + publicKeyString); & & & & & &String privateKeyString = getKeyString(privateKey); & & & & & &System.out.println(&private:\n& + privateKeyString); & & & & & &//加解密类 & & & & & &Cipher cipher = Cipher.getInstance(&RSA&);//Cipher.getInstance(&RSA/ECB/PKCS1Padding&); & & & & & &//明文 & & & & & &byte[] plainText = &我们都很好!邮件:@&.getBytes(); & & & & & &//加密 & & & & & &cipher.init(Cipher.ENCRYPT_MODE, publicKey); & & & &byte[] enBytes = cipher.doFinal(plainText);//通过密钥字符串得到密钥 & & & & & &publicKey = getPublicKey(publicKeyString); & & & & & &privateKey = getPrivateKey(privateKeyString); & & & & & &//解密 & & & & & &cipher.init(Cipher.DECRYPT_MODE, privateKey); & & & & & &byte[]deBytes = cipher.doFinal(enBytes); & & & & & &publicKeyString = getKeyString(publicKey); & & & & & &System.out.println(&public:\n& +publicKeyString); & & & & & &privateKeyString = getKeyString(privateKey); & & & & & &System.out.println(&private:\n& + privateKeyString); & & & & & &String s = new String(deBytes); & & & & & &System.out.println(s); & & &}通过modulus \public exponent \private exponent生成 RSA Keyimport java.math.BigIimport java.security.KeyFimport java.security.PrivateKimport java.security.PublicKimport java.security.spec.RSAPrivateKeySimport java.security.spec.RSAPublicKeySimport javax.crypto.Cpublic class RsaKey { & & &public PublicKey getPublicKey(String modulus,String publicExponent) throws Exception { & & & & & &BigInteger m = new BigInteger(modulus); & & & & & &BigInteger e = new BigInteger(publicExponent); & & & & & &RSAPublicKeySpec keySpec = new RSAPublicKeySpec(m,e); & & & & & &KeyFactory keyFactory = KeyFactory.getInstance(&RSA&); & & & & & &PublicKey publicKey = keyFactory.generatePublic(keySpec); & & & & & &return publicK & & &} & & &public PrivateKey getPrivateKey(String modulus,String privateExponent) throws Exception { & & & & & &BigInteger m = new BigInteger(modulus); & & & & & &BigInteger e = new BigInteger(privateExponent); & & & & & &RSAPrivateKeySpec keySpec = new RSAPrivateKeySpec(m,e); & & & & & &KeyFactory keyFactory = KeyFactory.getInstance(&RSA&); & & & & & &PrivateKey privateKey = keyFactory.generatePrivate(keySpec); & & & & & &return privateK & & &} & & &public static void main(String[] args) throws Exception { & & & & & &String modulus = &&; & & & & & &String publicExponent = &65537&; & & & & & &String privateExponet = &&; & & & & & &RsaKey key = new RsaKey(); & & & & & &PublicKey publicKey = key.getPublicKey(modulus, publicExponent); & & & & & &PrivateKey privateKey = key.getPrivateKey(modulus, privateExponet); & & & & & &//加解密类 & & & & & &Cipher cipher = Cipher.getInstance(&RSA&); & & &//明文 & & & & & &byte[] plainText = &我们都很好!邮件:@&.getBytes(); & & & & & &//加密 & & & & & &cipher.init(Cipher.ENCRYPT_MODE, publicKey); & & & &byte[] enBytes = cipher.doFinal(plainText); & & & &cipher.init(Cipher.DECRYPT_MODE, privateKey); & & & & & &byte[]deBytes = cipher.doFinal(enBytes); & & &String s = new String(deBytes); & & & & & &System.out.println(s); & & &}}
全国校区查询
技术分享点击榜
技术分享最新文章
官方新版意见收集
*您的积极反馈是我们前进的动力
官方新版意见收集
提交成功,感谢您的反馈。
我们会认真阅读和考虑每个用户的反馈。

我要回帖

更多关于 java公钥加密私钥解密 的文章

 

随机推荐