Encrypt text to AES/CBC/PKCS7Padding

前端 未结 3 663
孤独总比滥情好
孤独总比滥情好 2020-12-16 00:52

I am developing a web application to encrypt some texts with java 6.

The encrypted that I have to do is a AES (Rijndael) in CBC mode with PKCS7 padding and a 128-bi

3条回答
  •  粉色の甜心
    2020-12-16 01:17

    The Java specification list a number of encryption modes (and paddings) that needs to be supported. PKCS7Padding is not included.

    These are the AES/CBC modes any Java implementation must support.

    • AES/CBC/NoPadding (128 bit key)
    • AES/CBC/PKCS5Padding (128 bit key)

    (See this answer for more information)

    Bouncy Castle does however have what you need.

提交回复
热议问题