InvalidKeyException Illegal key size
问题 I have a test which runs great on my development MacBook Pro, but fails to run in continuous integration TeamCity server. The error is following: java.security.InvalidKeyException: Illegal key size at javax.crypto.Cipher.a(DashoA13*..) at javax.crypto.Cipher.init(DashoA13*..) at javax.crypto.Cipher.init(DashoA13*..) Both development box and TeamCity uses Java 1.6 and I use BouncyCastle library for the need of special AES encryption. The code is following: private byte[] aesEncryptedInfo