使用Spongy Castle在Android上签名的自签名证书

时间:2015-10-29 17:50:43

标签: android rsa digital-signature bouncycastle x509

我正在使用SpongyCastle在Android上创建自签名证书。

KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA", "BC");
ContentSigner sigGen = new JcaContentSignerBuilder("SHA256WithRSAEncryption").setProvider("BC").build(keyPair.getPrivate());

一切正常,但SHA256WithRSAEncryption会生成PKCS#1.5 Padding。我不想要填充。我已按照用户的建议尝试使用“SHA256withRSA / PSS”,但在Spongy上找不到该alg。有没有人知道我可以和SpongyCastle使用其他类型的签名alg?

0 个答案:

没有答案
相关问题