CCMBlockCipher { public final static byte[] encrypt(SecretKey key, byte[] nonce, byte[] additionalData, byte[] message, int numAuthenticationBytes) throws GeneralSecurityException { return encrypt(0, key, nonce, additionalData, message, numAuthenticationBytes); }  final static byte[] decrypt(SecretKey key, byte[] nonce, byte[] additionalData, byte[] crypted, int numAuthenticationBytes); final static byte[] decrypt(SecretKey key, byte[] nonce, byte[] additionalData, byte[] crypted,
			int cryptedOffset, int cryptedLength, int numAuthenticationBytes); final static byte[] encrypt(SecretKey key, byte[] nonce, byte[] additionalData, byte[] message,
			int numAuthenticationBytes); final static byte[] encrypt(int outputOffset, SecretKey key, byte[] nonce, byte[] additionalData, byte[] message,
			int numAuthenticationBytes); static final String CIPHER_NAME; static final ThreadLocalCipher CIPHER; }
@Test(expected = IllegalArgumentException.class) public void testTooShortNonce() throws Exception { nonce = Arrays.copyOf(nonce, 6); CCMBlockCipher.encrypt(aesKey, nonce, additionalData, payloadData, 8); }
@Test(expected = IllegalArgumentException.class) public void testTooLongNonce() throws Exception { nonce = adjustLength(nonce, 14); CCMBlockCipher.encrypt(aesKey, nonce, additionalData, payloadData, 8); }