test_class.declarator: rfcTestVectors = {
      new RFCTestVector(
          "000102030405060708090a0b0c0d0e0f",
          "101112131415161718191a1b1c1d1e1f",
          "1af38c2dc2b96ffdd86694092341bc04"
              + "c80edfa32ddf39d5ef00c0b468834279"
              + "a2e46a1b8049f792f76bfe54b903a9c9"
              + "a94ac9b47ad2655c5f10f9aef71427e2"
              + "fc6f9b3f399a221489f16362c7032336"
              + "09d45ac69864e3321cf82935ac4096c8"
              + "6e133314c54019e8ca7980dfa4b9cf1b"
              + "384c486f3a54c51078158ee5d79de59f"
              + "bd34d848b3d69550a67646344427ade5"
              + "4b8851ffb598f7f80074b9473c82e2db"
              + "652c3fa36b0a7c5b3219fab3a30bc1c4",
          "546865207365636f6e64207072696e6369706c65206f662041756775737465204b6572636b686f666673",
          "HMACSHA256",
          16,
          16),
      new RFCTestVector(
          "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f",
          "202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f",
          "1af38c2dc2b96ffdd86694092341bc04"
              + "4affaaadb78c31c5da4b1b590d10ffbd"
              + "3dd8d5d302423526912da037ecbcc7bd"
              + "822c301dd67c373bccb584ad3e9279c2"
              + "e6d12a1374b77f077553df829410446b"
              + "36ebd97066296ae6427ea75c2e0846a1"
              + "1a09ccf5370dc80bfecbad28c73f09b3"
              + "a3b75e662a2594410ae496b2e2e6609e"
              + "31e6e02cc837f053d21f37ff4f51950b"
              + "be2638d09dd7a4930930806d0703b1f6"
              + "4dd3b4c088a7f45c216839645b2012bf"
              + "2e6269a8c56a816dbc1b267761955bc5",
          "546865207365636f6e64207072696e6369706c65206f662041756775737465204b6572636b686f666673",
          "HMACSHA512",
          16,
          32)
    }
test_class.modifier: final
test_class.original_string: final RFCTestVector[] rfcTestVectors = {
      new RFCTestVector(
          "000102030405060708090a0b0c0d0e0f",
          "101112131415161718191a1b1c1d1e1f",
          "1af38c2dc2b96ffdd86694092341bc04"
              + "c80edfa32ddf39d5ef00c0b468834279"
              + "a2e46a1b8049f792f76bfe54b903a9c9"
              + "a94ac9b47ad2655c5f10f9aef71427e2"
              + "fc6f9b3f399a221489f16362c7032336"
              + "09d45ac69864e3321cf82935ac4096c8"
              + "6e133314c54019e8ca7980dfa4b9cf1b"
              + "384c486f3a54c51078158ee5d79de59f"
              + "bd34d848b3d69550a67646344427ade5"
              + "4b8851ffb598f7f80074b9473c82e2db"
              + "652c3fa36b0a7c5b3219fab3a30bc1c4",
          "546865207365636f6e64207072696e6369706c65206f662041756775737465204b6572636b686f666673",
          "HMACSHA256",
          16,
          16),
      new RFCTestVector(
          "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f",
          "202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f",
          "1af38c2dc2b96ffdd86694092341bc04"
              + "4affaaadb78c31c5da4b1b590d10ffbd"
              + "3dd8d5d302423526912da037ecbcc7bd"
              + "822c301dd67c373bccb584ad3e9279c2"
              + "e6d12a1374b77f077553df829410446b"
              + "36ebd97066296ae6427ea75c2e0846a1"
              + "1a09ccf5370dc80bfecbad28c73f09b3"
              + "a3b75e662a2594410ae496b2e2e6609e"
              + "31e6e02cc837f053d21f37ff4f51950b"
              + "be2638d09dd7a4930930806d0703b1f6"
              + "4dd3b4c088a7f45c216839645b2012bf"
              + "2e6269a8c56a816dbc1b267761955bc5",
          "546865207365636f6e64207072696e6369706c65206f662041756775737465204b6572636b686f666673",
          "HMACSHA512",
          16,
          32)
    };
test_class.type: RFCTestVector[]
test_class.var_name: rfcTestVectors
test_class.file: java_src/src/test/java/com/google/crypto/tink/subtle/EncryptThenAuthenticateTest.java
test_class.identifier: EncryptThenAuthenticateTest
test_case.body: @Test
    public void testRFCVectors() throws Exception {
      for (int i = 0; i < rfcTestVectors.length; i++) {
        RFCTestVector t = rfcTestVectors[i];
        if (Cipher.getMaxAllowedKeyLength("AES") < 256 && t.encKey.length > 16) {
          System.out.println(
              "Unlimited Strength Jurisdiction Policy Files are required"
                  + " but not installed. Skip tests with keys larger than 128 bits.");
          continue;
        }
        Aead aead = getAead(t.macKey, t.encKey, t.ivSize, t.tagLength, t.macAlg);
        try {
          aead.decrypt(t.ciphertext, t.aad);
        } catch (GeneralSecurityException e) {
          fail("Ciphertext and aad are valid, shouldn't reach here: " + i + " " + e);
        }
      }
    }
test_case.class_method_signature: EncryptThenAuthenticateTest.testRFCVectors()
test_case.full_signature: @Test public void testRFCVectors()
test_case.identifier: testRFCVectors
test_case.invocations: getMaxAllowedKeyLength println getAead decrypt fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRFCVectors()
focal_class.declarator: cipher
focal_class.modifier: private final
focal_class.original_string: private final IndCpaCipher cipher;
focal_class.type: IndCpaCipher
focal_class.var_name: cipher
focal_class.declarator: mac
focal_class.modifier: private final
focal_class.original_string: private final Mac mac;
focal_class.type: Mac
focal_class.var_name: mac
focal_class.declarator: macLength
focal_class.modifier: private final
focal_class.original_string: private final int macLength;
focal_class.type: int
focal_class.var_name: macLength
focal_class.file: java_src/src/main/java/com/google/crypto/tink/subtle/EncryptThenAuthenticate.java
focal_class.identifier: EncryptThenAuthenticate
focal_class.interfaces: implements Aead
focal_class.class_method_signature: EncryptThenAuthenticate.EncryptThenAuthenticate(final IndCpaCipher cipher, final Mac mac, int macLength)
focal_class.full_signature: public  EncryptThenAuthenticate(final IndCpaCipher cipher, final Mac mac, int macLength)
focal_class.identifier: EncryptThenAuthenticate
focal_class.modifiers: public
focal_class.parameters: (final IndCpaCipher cipher, final Mac mac, int macLength)
focal_class.signature:  EncryptThenAuthenticate(final IndCpaCipher cipher, final Mac mac, int macLength)
focal_class.class_method_signature: EncryptThenAuthenticate.newAesCtrHmac(
        final byte[] aesCtrKey, int ivSize, String hmacAlgorithm, final byte[] hmacKey, int tagSize)
focal_class.full_signature: public static Aead newAesCtrHmac(
        final byte[] aesCtrKey, int ivSize, String hmacAlgorithm, final byte[] hmacKey, int tagSize)
focal_class.identifier: newAesCtrHmac
focal_class.modifiers: public static
focal_class.parameters: (
        final byte[] aesCtrKey, int ivSize, String hmacAlgorithm, final byte[] hmacKey, int tagSize)
focal_class.return: Aead
focal_class.signature: Aead newAesCtrHmac(
        final byte[] aesCtrKey, int ivSize, String hmacAlgorithm, final byte[] hmacKey, int tagSize)
focal_class.class_method_signature: EncryptThenAuthenticate.encrypt(final byte[] plaintext, final byte[] associatedData)
focal_class.full_signature: @Override public byte[] encrypt(final byte[] plaintext, final byte[] associatedData)
focal_class.identifier: encrypt
focal_class.modifiers: @Override public
focal_class.parameters: (final byte[] plaintext, final byte[] associatedData)
focal_class.return: byte[]
focal_class.signature: byte[] encrypt(final byte[] plaintext, final byte[] associatedData)
focal_class.class_method_signature: EncryptThenAuthenticate.decrypt(final byte[] ciphertext, final byte[] associatedData)
focal_class.full_signature: @Override public byte[] decrypt(final byte[] ciphertext, final byte[] associatedData)
focal_class.identifier: decrypt
focal_class.modifiers: @Override public
focal_class.parameters: (final byte[] ciphertext, final byte[] associatedData)
focal_class.return: byte[]
focal_class.signature: byte[] decrypt(final byte[] ciphertext, final byte[] associatedData)
focal_method.body: @Override
    public byte[] decrypt(final byte[] ciphertext, final byte[] associatedData)
        throws GeneralSecurityException {
      if (ciphertext.length < macLength) {
        throw new GeneralSecurityException("ciphertext too short");
      }
      byte[] rawCiphertext = Arrays.copyOfRange(ciphertext, 0, ciphertext.length - macLength);
      byte[] macValue =
          Arrays.copyOfRange(ciphertext, ciphertext.length - macLength, ciphertext.length);
      byte[] aad = associatedData;
      if (aad == null) {
        aad = new byte[0];
      }
      byte[] aadLengthInBits =
          Arrays.copyOf(ByteBuffer.allocate(8).putLong(8L * aad.length).array(), 8);
      mac.verifyMac(macValue, Bytes.concat(aad, rawCiphertext, aadLengthInBits));
      return cipher.decrypt(rawCiphertext);
    }
focal_method.class_method_signature: EncryptThenAuthenticate.decrypt(final byte[] ciphertext, final byte[] associatedData)
focal_method.full_signature: @Override public byte[] decrypt(final byte[] ciphertext, final byte[] associatedData)
focal_method.identifier: decrypt
focal_method.invocations: copyOfRange copyOfRange copyOf array putLong allocate verifyMac concat decrypt
focal_method.modifiers: @Override public
focal_method.parameters: (final byte[] ciphertext, final byte[] associatedData)
focal_method.return: byte[]
focal_method.signature: byte[] decrypt(final byte[] ciphertext, final byte[] associatedData)