java.security.InvalidKeyException

Invalid AES key length: 4 bytes

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web15

  • via Stack Overflow by Sandah Aung
    ,
  • Stack trace

    • java.security.InvalidKeyException: Invalid AES key length: 4 bytes at com.sun.crypto.provider.AESCipher.engineGetKeySize(AESCipher.java:495) at javax.crypto.Cipher.passCryptoPermCheck(Cipher.java:1067) at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1025) at javax.crypto.Cipher.implInit(Cipher.java:801) at javax.crypto.Cipher.chooseProvider(Cipher.java:864) at javax.crypto.Cipher.init(Cipher.java:1249) at javax.crypto.Cipher.init(Cipher.java:1186) at com.example.test.app.Decrypt.main(Decrypt.java:24)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    musketyrmusketyr
    2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    linxiaolonglinxiaolong
    17 times, last one
    HandemelindoHandemelindo
    2 times, last one