AES Encryption Java Invalid Key length

后端 未结 5 1682
甜味超标
甜味超标 2020-12-30 10:23

I am trying to create an AES encryption method, but for some reason I keep getting

java.security.InvalidKeyException: Key length not 128/192/256

5条回答
  •  太阳男子
    2020-12-30 10:48

    using any padding mechanisms to fill the empty bits

    Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
    

提交回复
热议问题