test_class.declarator: MERCHANT_PUBLIC_KEY_BASE64 =
        "BOdoXP+9Aq473SnGwg3JU1aiNpsd9vH2ognq4PtDtlLGa3Kj8TPf+jaQNPyDSkh3JUhiS0KyrrlWhAgNZKHYF2Y="
test_class.modifier: private static final
test_class.original_string: private static final String MERCHANT_PUBLIC_KEY_BASE64 =
        "BOdoXP+9Aq473SnGwg3JU1aiNpsd9vH2ognq4PtDtlLGa3Kj8TPf+jaQNPyDSkh3JUhiS0KyrrlWhAgNZKHYF2Y=";
test_class.type: String
test_class.var_name: MERCHANT_PUBLIC_KEY_BASE64
test_class.declarator: MERCHANT_PRIVATE_KEY_PKCS8_BASE64 =
        "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgCPSuFr4iSIaQprjj"
            + "chHPyDu2NXFe0vDBoTpPkYaK9dehRANCAATnaFz/vQKuO90pxsINyVNWojabHfbx"
            + "9qIJ6uD7Q7ZSxmtyo/Ez3/o2kDT8g0pIdyVIYktCsq65VoQIDWSh2Bdm"
test_class.modifier: private static final
test_class.original_string: private static final String MERCHANT_PRIVATE_KEY_PKCS8_BASE64 =
        "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgCPSuFr4iSIaQprjj"
            + "chHPyDu2NXFe0vDBoTpPkYaK9dehRANCAATnaFz/vQKuO90pxsINyVNWojabHfbx"
            + "9qIJ6uD7Q7ZSxmtyo/Ez3/o2kDT8g0pIdyVIYktCsq65VoQIDWSh2Bdm";
test_class.type: String
test_class.var_name: MERCHANT_PRIVATE_KEY_PKCS8_BASE64
test_class.declarator: GOOGLE_VERIFYING_PUBLIC_KEYS_JSON =
        "{\n"
            + "  \"keys\": [\n"
            + "    {\n"
            + "      \"keyValue\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEPYnHwS8uegWAewQtlxizmLFynw"
            + "HcxRT1PK07cDA6/C4sXrVI1SzZCUx8U8S0LjMrT6ird/VW7be3Mz6t/srtRQ==\",\n"
            + "      \"protocolVersion\": \"ECv1\"\n"
            + "    },\n"
            + "    {\n"
            + "      \"keyValue\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/1+3HBVSbdv+j7NaArdgMyoSAM"
            + "43yRydzqdg1TxodSzA96Dj4Mc1EiKroxxunavVIvdxGnJeFViTzFvzFRxyCw==\",\n"
            + "      \"keyExpiration\": \""
            + Instant.now().plus(Duration.standardDays(1)).getMillis()
            + "\",\n"
            + "      \"protocolVersion\": \"ECv2\"\n"
            + "    },\n"
            + "    {\n"
            + "      \"keyValue\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAENXvYqxD5WayKYhuXQevdGdLA8i"
            + "fV4LsRS2uKvFo8wwyiwgQHB9DiKzG6T/P1Fu9Bl7zWy/se5Dy4wk1mJoPuxg==\",\n"
            + "      \"keyExpiration\": \""
            + Instant.now().plus(Duration.standardDays(1)).getMillis()
            + "\",\n"
            + "      \"protocolVersion\": \"ECv2SigningOnly\"\n"
            + "    },\n"
            + "  ],\n"
            + "}"
test_class.modifier: private static final
test_class.original_string: private static final String GOOGLE_VERIFYING_PUBLIC_KEYS_JSON =
        "{\n"
            + "  \"keys\": [\n"
            + "    {\n"
            + "      \"keyValue\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEPYnHwS8uegWAewQtlxizmLFynw"
            + "HcxRT1PK07cDA6/C4sXrVI1SzZCUx8U8S0LjMrT6ird/VW7be3Mz6t/srtRQ==\",\n"
            + "      \"protocolVersion\": \"ECv1\"\n"
            + "    },\n"
            + "    {\n"
            + "      \"keyValue\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/1+3HBVSbdv+j7NaArdgMyoSAM"
            + "43yRydzqdg1TxodSzA96Dj4Mc1EiKroxxunavVIvdxGnJeFViTzFvzFRxyCw==\",\n"
            + "      \"keyExpiration\": \""
            + Instant.now().plus(Duration.standardDays(1)).getMillis()
            + "\",\n"
            + "      \"protocolVersion\": \"ECv2\"\n"
            + "    },\n"
            + "    {\n"
            + "      \"keyValue\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAENXvYqxD5WayKYhuXQevdGdLA8i"
            + "fV4LsRS2uKvFo8wwyiwgQHB9DiKzG6T/P1Fu9Bl7zWy/se5Dy4wk1mJoPuxg==\",\n"
            + "      \"keyExpiration\": \""
            + Instant.now().plus(Duration.standardDays(1)).getMillis()
            + "\",\n"
            + "      \"protocolVersion\": \"ECv2SigningOnly\"\n"
            + "    },\n"
            + "  ],\n"
            + "}";
test_class.type: String
test_class.var_name: GOOGLE_VERIFYING_PUBLIC_KEYS_JSON
test_class.declarator: GOOGLE_SIGNING_EC_V1_PRIVATE_KEY_PKCS8_BASE64 =
        "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgZj/Dldxz8fvKVF5O"
            + "TeAtK6tY3G1McmvhMppe6ayW6GahRANCAAQ9icfBLy56BYB7BC2XGLOYsXKfAdzF"
            + "FPU8rTtwMDr8LixetUjVLNkJTHxTxLQuMytPqKt39Vbtt7czPq3+yu1F"
test_class.modifier: private static final
test_class.original_string: private static final String GOOGLE_SIGNING_EC_V1_PRIVATE_KEY_PKCS8_BASE64 =
        "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgZj/Dldxz8fvKVF5O"
            + "TeAtK6tY3G1McmvhMppe6ayW6GahRANCAAQ9icfBLy56BYB7BC2XGLOYsXKfAdzF"
            + "FPU8rTtwMDr8LixetUjVLNkJTHxTxLQuMytPqKt39Vbtt7czPq3+yu1F";
test_class.type: String
test_class.var_name: GOOGLE_SIGNING_EC_V1_PRIVATE_KEY_PKCS8_BASE64
test_class.declarator: GOOGLE_SIGNING_EC_V2_PRIVATE_KEY_PKCS8_BASE64 =
        "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgKvEdSS8f0mjTCNKev"
            + "aKXIzfNC5b4A104gJWI9TsLIMqhRANCAAT/X7ccFVJt2/6Ps1oCt2AzKhIAz"
            + "jfJHJ3Op2DVPGh1LMD3oOPgxzUSIqujHG6dq9Ui93Eacl4VWJPMW/MVHHIL"
test_class.modifier: private static final
test_class.original_string: private static final String GOOGLE_SIGNING_EC_V2_PRIVATE_KEY_PKCS8_BASE64 =
        "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgKvEdSS8f0mjTCNKev"
            + "aKXIzfNC5b4A104gJWI9TsLIMqhRANCAAT/X7ccFVJt2/6Ps1oCt2AzKhIAz"
            + "jfJHJ3Op2DVPGh1LMD3oOPgxzUSIqujHG6dq9Ui93Eacl4VWJPMW/MVHHIL";
test_class.type: String
test_class.var_name: GOOGLE_SIGNING_EC_V2_PRIVATE_KEY_PKCS8_BASE64
test_class.declarator: GOOGLE_SIGNING_EC_V2_INTERMEDIATE_PUBLIC_KEY_X509_BASE64 =
        "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/1+3HBVSbdv+j7NaArdgMyoSAM43yR"
            + "ydzqdg1TxodSzA96Dj4Mc1EiKroxxunavVIvdxGnJeFViTzFvzFRxyCw=="
test_class.modifier: private static final
test_class.original_string: private static final String GOOGLE_SIGNING_EC_V2_INTERMEDIATE_PUBLIC_KEY_X509_BASE64 =
        "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/1+3HBVSbdv+j7NaArdgMyoSAM43yR"
            + "ydzqdg1TxodSzA96Dj4Mc1EiKroxxunavVIvdxGnJeFViTzFvzFRxyCw==";
test_class.type: String
test_class.var_name: GOOGLE_SIGNING_EC_V2_INTERMEDIATE_PUBLIC_KEY_X509_BASE64
test_class.declarator: GOOGLE_SIGNING_EC_V2_INTERMEDIATE_PRIVATE_KEY_PKCS8_BASE64 =
        "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgKvEdSS8f0mjTCNKev"
            + "aKXIzfNC5b4A104gJWI9TsLIMqhRANCAAT/X7ccFVJt2/6Ps1oCt2AzKhIAz"
            + "jfJHJ3Op2DVPGh1LMD3oOPgxzUSIqujHG6dq9Ui93Eacl4VWJPMW/MVHHIL"
test_class.modifier: private static final
test_class.original_string: private static final String GOOGLE_SIGNING_EC_V2_INTERMEDIATE_PRIVATE_KEY_PKCS8_BASE64 =
        "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgKvEdSS8f0mjTCNKev"
            + "aKXIzfNC5b4A104gJWI9TsLIMqhRANCAAT/X7ccFVJt2/6Ps1oCt2AzKhIAz"
            + "jfJHJ3Op2DVPGh1LMD3oOPgxzUSIqujHG6dq9Ui93Eacl4VWJPMW/MVHHIL";
test_class.type: String
test_class.var_name: GOOGLE_SIGNING_EC_V2_INTERMEDIATE_PRIVATE_KEY_PKCS8_BASE64
test_class.declarator: GOOGLE_SIGNING_EC_V2_SIGNING_ONLY_PRIVATE_KEY_PKCS8_BASE64 =
        "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgRi9hSdY+knJ08odnY"
            + "tZFMRi7ZYeMoasAijLhD4GiQ1yhRANCAAQ1e9irEPlZrIpiG5dB690Z0sDy"
            + "J9XguxFLa4q8WjzDDKLCBAcH0OIrMbpP8/UW70GXvNbL+x7kPLjCTWYmg+7G"
test_class.modifier: private static final
test_class.original_string: private static final String GOOGLE_SIGNING_EC_V2_SIGNING_ONLY_PRIVATE_KEY_PKCS8_BASE64 =
        "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgRi9hSdY+knJ08odnY"
            + "tZFMRi7ZYeMoasAijLhD4GiQ1yhRANCAAQ1e9irEPlZrIpiG5dB690Z0sDy"
            + "J9XguxFLa4q8WjzDDKLCBAcH0OIrMbpP8/UW70GXvNbL+x7kPLjCTWYmg+7G";
test_class.type: String
test_class.var_name: GOOGLE_SIGNING_EC_V2_SIGNING_ONLY_PRIVATE_KEY_PKCS8_BASE64
test_class.declarator: GOOGLE_SIGNING_EC_V2_SIGNING_ONLY_INTERMEDIATE_PUBLIC_KEY_X509_BASE64 =
            "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8OaurwvbyYm8JWDgFPRTIDg0/"
                + "kcQTFAQ4txi5IP0AyM1QiagwRhDUfjpqZkpw8xt/DXwyWYM0DdHqoeV"
                + "TKqmYQ=="
test_class.modifier: private static final
test_class.original_string: private static final String
        GOOGLE_SIGNING_EC_V2_SIGNING_ONLY_INTERMEDIATE_PUBLIC_KEY_X509_BASE64 =
            "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8OaurwvbyYm8JWDgFPRTIDg0/"
                + "kcQTFAQ4txi5IP0AyM1QiagwRhDUfjpqZkpw8xt/DXwyWYM0DdHqoeV"
                + "TKqmYQ==";
test_class.type: String
test_class.var_name: GOOGLE_SIGNING_EC_V2_SIGNING_ONLY_INTERMEDIATE_PUBLIC_KEY_X509_BASE64
test_class.declarator: GOOGLE_SIGNING_EC_V2_SIGNING_ONLY_INTERMEDIATE_PRIVATE_KEY_PKCS8_BASE64 =
            "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg+Jvpkq26tpZ0s"
                + "TTZVh4teEI41SnJdmkBzM8VZ5ZirE2hRANCAATw5q6vC9vJibwlYOAU"
                + "9FMgODT+RxBMUBDi3GLkg/QDIzVCJqDBGENR+OmpmSnDzG38NfDJZgz"
                + "QN0eqh5VMqqZh"
test_class.modifier: private static final
test_class.original_string: private static final String
        GOOGLE_SIGNING_EC_V2_SIGNING_ONLY_INTERMEDIATE_PRIVATE_KEY_PKCS8_BASE64 =
            "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg+Jvpkq26tpZ0s"
                + "TTZVh4teEI41SnJdmkBzM8VZ5ZirE2hRANCAATw5q6vC9vJibwlYOAU"
                + "9FMgODT+RxBMUBDi3GLkg/QDIzVCJqDBGENR+OmpmSnDzG38NfDJZgz"
                + "QN0eqh5VMqqZh";
test_class.type: String
test_class.var_name: GOOGLE_SIGNING_EC_V2_SIGNING_ONLY_INTERMEDIATE_PRIVATE_KEY_PKCS8_BASE64
test_class.declarator: RECIPIENT_ID = "someRecipient"
test_class.modifier: private static final
test_class.original_string: private static final String RECIPIENT_ID = "someRecipient";
test_class.type: String
test_class.var_name: RECIPIENT_ID
test_class.file: apps/paymentmethodtoken/src/test/java/com/google/crypto/tink/apps/paymentmethodtoken/PaymentMethodTokenSenderTest.java
test_class.identifier: PaymentMethodTokenSenderTest
test_case.body: @Test
    public void testECV2SigningOnlyWithPrecomputedKeys() throws Exception {
      PaymentMethodTokenSender sender =
          new PaymentMethodTokenSender.Builder()
              .protocolVersion(PaymentMethodTokenConstants.PROTOCOL_VERSION_EC_V2_SIGNING_ONLY)
              .senderIntermediateSigningKey(
                  GOOGLE_SIGNING_EC_V2_SIGNING_ONLY_INTERMEDIATE_PRIVATE_KEY_PKCS8_BASE64)
              .senderIntermediateCert(
                  new SenderIntermediateCertFactory.Builder()
                      .protocolVersion(
                          PaymentMethodTokenConstants.PROTOCOL_VERSION_EC_V2_SIGNING_ONLY)
                      .addSenderSigningKey(GOOGLE_SIGNING_EC_V2_SIGNING_ONLY_PRIVATE_KEY_PKCS8_BASE64)
                      .senderIntermediateSigningKey(
                          GOOGLE_SIGNING_EC_V2_SIGNING_ONLY_INTERMEDIATE_PUBLIC_KEY_X509_BASE64)
                      .expiration(Instant.now().plus(Duration.standardDays(1)).getMillis())
                      .build()
                      .create())
              .recipientId(RECIPIENT_ID)
              .build();
  
      PaymentMethodTokenRecipient recipient =
          new PaymentMethodTokenRecipient.Builder()
              .protocolVersion(PaymentMethodTokenConstants.PROTOCOL_VERSION_EC_V2_SIGNING_ONLY)
              .senderVerifyingKeys(GOOGLE_VERIFYING_PUBLIC_KEYS_JSON)
              .recipientId(RECIPIENT_ID)
              .build();
  
      String plaintext = "blah";
      assertEquals(plaintext, recipient.unseal(sender.seal(plaintext)));
    }
test_case.class_method_signature: PaymentMethodTokenSenderTest.testECV2SigningOnlyWithPrecomputedKeys()
test_case.full_signature: @Test public void testECV2SigningOnlyWithPrecomputedKeys()
test_case.identifier: testECV2SigningOnlyWithPrecomputedKeys
test_case.invocations: build recipientId senderIntermediateCert senderIntermediateSigningKey protocolVersion create build expiration senderIntermediateSigningKey addSenderSigningKey protocolVersion getMillis plus now standardDays build recipientId senderVerifyingKeys protocolVersion assertEquals unseal seal
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testECV2SigningOnlyWithPrecomputedKeys()
focal_class.declarator: protocolVersion
focal_class.modifier: private final
focal_class.original_string: private final String protocolVersion;
focal_class.type: String
focal_class.var_name: protocolVersion
focal_class.declarator: protocolVersionConfig
focal_class.modifier: private final
focal_class.original_string: private final ProtocolVersionConfig protocolVersionConfig;
focal_class.type: ProtocolVersionConfig
focal_class.var_name: protocolVersionConfig
focal_class.declarator: signer
focal_class.modifier: private final
focal_class.original_string: private final PublicKeySign signer;
focal_class.type: PublicKeySign
focal_class.var_name: signer
focal_class.declarator: senderIntermediateCert
focal_class.modifier: private final
focal_class.original_string: private final String senderIntermediateCert;
focal_class.type: String
focal_class.var_name: senderIntermediateCert
focal_class.declarator: senderId
focal_class.modifier: private final
focal_class.original_string: private final String senderId;
focal_class.type: String
focal_class.var_name: senderId
focal_class.declarator: recipientId
focal_class.modifier: private final
focal_class.original_string: private final String recipientId;
focal_class.type: String
focal_class.var_name: recipientId
focal_class.declarator: hybridEncrypter
focal_class.modifier: private
focal_class.original_string: private HybridEncrypt hybridEncrypter;
focal_class.type: HybridEncrypt
focal_class.var_name: hybridEncrypter
focal_class.file: apps/paymentmethodtoken/src/main/java/com/google/crypto/tink/apps/paymentmethodtoken/PaymentMethodTokenSender.java
focal_class.identifier: PaymentMethodTokenSender
focal_class.class_method_signature: PaymentMethodTokenSender.PaymentMethodTokenSender(Builder builder)
focal_class.full_signature:   PaymentMethodTokenSender(Builder builder)
focal_class.identifier: PaymentMethodTokenSender
focal_class.parameters: (Builder builder)
focal_class.signature:  PaymentMethodTokenSender(Builder builder)
focal_class.class_method_signature: PaymentMethodTokenSender.seal(final String message)
focal_class.full_signature: public String seal(final String message)
focal_class.identifier: seal
focal_class.modifiers: public
focal_class.parameters: (final String message)
focal_class.return: String
focal_class.signature: String seal(final String message)
focal_class.class_method_signature: PaymentMethodTokenSender.sealV1OrV2(final String message)
focal_class.full_signature: private String sealV1OrV2(final String message)
focal_class.identifier: sealV1OrV2
focal_class.modifiers: private
focal_class.parameters: (final String message)
focal_class.return: String
focal_class.signature: String sealV1OrV2(final String message)
focal_class.class_method_signature: PaymentMethodTokenSender.signV1OrV2(String message)
focal_class.full_signature: private String signV1OrV2(String message)
focal_class.identifier: signV1OrV2
focal_class.modifiers: private
focal_class.parameters: (String message)
focal_class.return: String
focal_class.signature: String signV1OrV2(String message)
focal_class.class_method_signature: PaymentMethodTokenSender.validateV1(Builder builder)
focal_class.full_signature: private static void validateV1(Builder builder)
focal_class.identifier: validateV1
focal_class.modifiers: private static
focal_class.parameters: (Builder builder)
focal_class.return: void
focal_class.signature: void validateV1(Builder builder)
focal_class.class_method_signature: PaymentMethodTokenSender.validateV2(Builder builder)
focal_class.full_signature: private static void validateV2(Builder builder)
focal_class.identifier: validateV2
focal_class.modifiers: private static
focal_class.parameters: (Builder builder)
focal_class.return: void
focal_class.signature: void validateV2(Builder builder)
focal_class.class_method_signature: PaymentMethodTokenSender.validateV2SigningOnly(Builder builder)
focal_class.full_signature: private static void validateV2SigningOnly(Builder builder)
focal_class.identifier: validateV2SigningOnly
focal_class.modifiers: private static
focal_class.parameters: (Builder builder)
focal_class.return: void
focal_class.signature: void validateV2SigningOnly(Builder builder)
focal_class.class_method_signature: PaymentMethodTokenSender.validateIntermediateSigningKeys(Builder builder)
focal_class.full_signature: private static void validateIntermediateSigningKeys(Builder builder)
focal_class.identifier: validateIntermediateSigningKeys
focal_class.modifiers: private static
focal_class.parameters: (Builder builder)
focal_class.return: void
focal_class.signature: void validateIntermediateSigningKeys(Builder builder)
focal_method.body: public String seal(final String message) throws GeneralSecurityException {
      if (protocolVersion.equals(PaymentMethodTokenConstants.PROTOCOL_VERSION_EC_V1)
          || protocolVersion.equals(PaymentMethodTokenConstants.PROTOCOL_VERSION_EC_V2)
          || protocolVersion.equals(
              PaymentMethodTokenConstants.PROTOCOL_VERSION_EC_V2_SIGNING_ONLY)) {
        return sealV1OrV2(message);
      }
      throw new GeneralSecurityException("Unsupported version: " + protocolVersion);
    }
focal_method.class_method_signature: PaymentMethodTokenSender.seal(final String message)
focal_method.full_signature: public String seal(final String message)
focal_method.identifier: seal
focal_method.invocations: equals equals equals sealV1OrV2
focal_method.modifiers: public
focal_method.parameters: (final String message)
focal_method.return: String
focal_method.signature: String seal(final String message)