Alan Wei

Results 1 issues of Alan Wei

你好,我是.Net开发者,我想问一下这两个语言之间互相RSA加密解密的问题。 在.Net提供中RSA加密对象RSACryptoServiceProvider支持PKCS#1 v1.5 padding,在Java中同样适用PKCS1填充,为什么加密后的密文不一致呢? 下面是Java的实现: ``` public static String encrypt(String source, String publicKey) throws Exception { Key key = getPublicKey(publicKey); /** 得到Cipher对象来实现对源数据的RSA加密 */ Cipher cipher = Cipher.getInstance(ConfigureEncryptAndDecrypt.RSA_ALGORITHM); cipher.init(Cipher.ENCRYPT_MODE, key); byte[]...