@Test(expected = IllegalArgumentException.class) public void padTooLongTest() { AesUtil.cmacPad(new byte[16]); }
static byte[] cmacPad(final byte[] x) { if (x.length >= BLOCK_SIZE) { throw new IllegalArgumentException("x must be smaller than a block."); } byte[] result = Arrays.copyOf(x, 16); result[x.length] = (byte) 0x80; return result; }
AesUtil { static byte[] cmacPad(final byte[] x) { if (x.length >= BLOCK_SIZE) { throw new IllegalArgumentException("x must be smaller than a block."); } byte[] result = Arrays.copyOf(x, 16); result[x.length] = (byte) 0x80; return result; } }
AesUtil { static byte[] cmacPad(final byte[] x) { if (x.length >= BLOCK_SIZE) { throw new IllegalArgumentException("x must be smaller than a block."); } byte[] result = Arrays.copyOf(x, 16); result[x.length] = (byte) 0x80; return result; }  }
AesUtil { static byte[] cmacPad(final byte[] x) { if (x.length >= BLOCK_SIZE) { throw new IllegalArgumentException("x must be smaller than a block."); } byte[] result = Arrays.copyOf(x, 16); result[x.length] = (byte) 0x80; return result; }   }
AesUtil { static byte[] cmacPad(final byte[] x) { if (x.length >= BLOCK_SIZE) { throw new IllegalArgumentException("x must be smaller than a block."); } byte[] result = Arrays.copyOf(x, 16); result[x.length] = (byte) 0x80; return result; }   static final int BLOCK_SIZE; }