test_class.declarator: EMPTY = {}
test_class.modifier: static final
test_class.original_string: static final byte[] EMPTY = {};
test_class.type: byte[]
test_class.var_name: EMPTY
test_class.declarator: ONE_ONE = {1}
test_class.modifier: static final
test_class.original_string: static final byte[] ONE_ONE = {1};
test_class.type: byte[]
test_class.var_name: ONE_ONE
test_class.file: java_src/src/test/java/com/google/crypto/tink/subtle/AesUtilTest.java
test_class.identifier: AesUtilTest
test_case.body: @Test
    public void dblTestVectors() {
      // Extracted from the SIV test vectors at https://tools.ietf.org/html/rfc5297#section-2.3
      // (all the double() steps in Appendix A)
      String[] testVectorInputs = {
          "0e04dfafc1efbf040140582859bf073a",
          "edf09de876c642ee4d78bce4ceedfc4f",
          "c8b43b5974960e7ce6a5dd85231e591a",
          "adf31e285d3d1e1d4ddefc1e5bec63e9",
          "826aa75b5e568eed3125bfb266c61d4e",
      };
      String[] testVectorOutputs = {
          "1c09bf5f83df7e080280b050b37e0e74",
          "dbe13bd0ed8c85dc9af179c99ddbf819",
          "916876b2e92c1cf9cd4bbb0a463cb2b3",
          "5be63c50ba7a3c3a9bbdf83cb7d8c755",
          "04d54eb6bcad1dda624b7f64cd8c3a1b",
      };
  
      byte[] r;
      for (int i = 0; i < testVectorInputs.length; i++) {
        r = AesUtil.dbl(Hex.decode(testVectorInputs[i]));
        assertEquals(testVectorOutputs[i], Hex.encode(r));
      }
    }
test_case.class_method_signature: AesUtilTest.dblTestVectors()
test_case.full_signature: @Test public void dblTestVectors()
test_case.identifier: dblTestVectors
test_case.invocations: dbl decode assertEquals encode
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void dblTestVectors()
focal_class.declarator: BLOCK_SIZE = 16
focal_class.modifier: public static final
focal_class.original_string: public static final int BLOCK_SIZE = 16;
focal_class.type: int
focal_class.var_name: BLOCK_SIZE
focal_class.file: java_src/src/main/java/com/google/crypto/tink/subtle/AesUtil.java
focal_class.identifier: AesUtil
focal_class.class_method_signature: AesUtil.dbl(final byte[] value)
focal_class.full_signature: static byte[] dbl(final byte[] value)
focal_class.identifier: dbl
focal_class.modifiers: static
focal_class.parameters: (final byte[] value)
focal_class.return: byte[]
focal_class.signature: byte[] dbl(final byte[] value)
focal_class.class_method_signature: AesUtil.cmacPad(final byte[] x)
focal_class.full_signature: static byte[] cmacPad(final byte[] x)
focal_class.identifier: cmacPad
focal_class.modifiers: static
focal_class.parameters: (final byte[] x)
focal_class.return: byte[]
focal_class.signature: byte[] cmacPad(final byte[] x)
focal_method.body: static byte[] dbl(final byte[] value) {
      if (value.length != BLOCK_SIZE) {
        throw new IllegalArgumentException("value must be a block.");
      }
  
      // Note that >> is an arithmetical shift, which copies the leftmost bit to fill the
      // blanks created by shifting. For instance, x >> 7 will equal 0xFF if (x & 1), and 0x00
      // otherwise. This is a bit hard to read, but the operation is branchless, which is valuable
      // in this context.
  
      // Shift left by one.
      byte[] res = new byte[BLOCK_SIZE];
      for (int i = 0; i < BLOCK_SIZE; i++) {
        res[i] = (byte) (0xFE & (value[i] << 1));
        if (i < BLOCK_SIZE - 1) {
          res[i] |= (byte) (0x01 & (value[i + 1] >> 7));
        }
      }
      // And handle the modulus if needed (0x87 is the binary representation of the polynomial,
      // minus the x^128 part).
      res[BLOCK_SIZE - 1] ^= (byte) (0x87 & (value[0] >> 7));
      return res;
    }
focal_method.class_method_signature: AesUtil.dbl(final byte[] value)
focal_method.full_signature: static byte[] dbl(final byte[] value)
focal_method.identifier: dbl
focal_method.modifiers: static
focal_method.parameters: (final byte[] value)
focal_method.return: byte[]
focal_method.signature: byte[] dbl(final byte[] value)