How to use Bouncy Castle lightweight API with AES and PBE

前端 未结 4 975
清酒与你
清酒与你 2020-12-08 17:47

I have a block of ciphertext that was created using the JCE algorithim \"PBEWithSHA256And256BitAES-CBC-BC\". The provider is BouncyCastle. What I\'d like to do it decrypt th

4条回答
  •  旧时难觅i
    2020-12-08 18:30

    It's not trivial to generate the key exactly as the JCE counterparts. I just briefly browsed your code. Found at least one discrepancy. JCE uses PKCS12 generator but you use PKCS5S1.

    I am not surprised if there are other differences. You need to compare your code against BC source.

提交回复
热议问题