Forum Stats

  • 3,826,348 Users
  • 2,260,632 Discussions
  • 7,896,912 Comments

Discussions

Encrypt password gives javax.crypto.IllegalBlockSizeException

20378
20378 Member Posts: 577

Hello,

when trying to encrypt a password using maven I get the following error:

$ mvn -ep secretpwd

[ERROR] Error executing Maven.

[ERROR] javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher

[ERROR] Caused by: Input length must be multiple of 16 when decrypting with padded cipher

I am using the following java version:

$ java -version

java version "1.8.0_231"

Java(TM) SE Runtime Environment (build 1.8.0_231-b11)

Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

Any idea what could be wrong?

Thanks

Andy