test_class.file: java_src/src/test/java/com/google/crypto/tink/subtle/Ed25519SignTest.java
test_class.identifier: Ed25519SignTest
test_case.body: @Test
    public void testSigningWithWycheproofVectors() throws Exception {
      JSONObject json =
          WycheproofTestUtil.readJson("../wycheproof/testvectors/eddsa_test.json");
      int errors = 0;
      JSONArray testGroups = json.getJSONArray("testGroups");
      for (int i = 0; i < testGroups.length(); i++) {
        JSONObject group = testGroups.getJSONObject(i);
        JSONObject key = group.getJSONObject("key");
        byte[] privateKey = Hex.decode(key.getString("sk"));
        JSONArray tests = group.getJSONArray("tests");
        for (int j = 0; j < tests.length(); j++) {
          JSONObject testcase = tests.getJSONObject(j);
          String tcId =
              String.format(
                  "testcase %d (%s)", testcase.getInt("tcId"), testcase.getString("comment"));
          byte[] msg = getMessage(testcase);
          byte[] sig = Hex.decode(testcase.getString("sig"));
          String result = testcase.getString("result");
          if (result.equals("invalid")) {
            continue;
          }
          Ed25519Sign signer = new Ed25519Sign(privateKey);
          byte[] computedSig = signer.sign(msg);
          assertArrayEquals(tcId, sig, computedSig);
        }
      }
      assertEquals(0, errors);
    }
test_case.class_method_signature: Ed25519SignTest.testSigningWithWycheproofVectors()
test_case.full_signature: @Test public void testSigningWithWycheproofVectors()
test_case.identifier: testSigningWithWycheproofVectors
test_case.invocations: readJson getJSONArray length getJSONObject getJSONObject decode getString getJSONArray length getJSONObject format getInt getString getMessage decode getString getString equals sign assertArrayEquals assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSigningWithWycheproofVectors()
focal_class.declarator: SECRET_KEY_LEN = Field25519.FIELD_LEN
focal_class.modifier: public static final
focal_class.original_string: public static final int SECRET_KEY_LEN = Field25519.FIELD_LEN;
focal_class.type: int
focal_class.var_name: SECRET_KEY_LEN
focal_class.declarator: hashedPrivateKey
focal_class.modifier: private final
focal_class.original_string: private final byte[] hashedPrivateKey;
focal_class.type: byte[]
focal_class.var_name: hashedPrivateKey
focal_class.declarator: publicKey
focal_class.modifier: private final
focal_class.original_string: private final byte[] publicKey;
focal_class.type: byte[]
focal_class.var_name: publicKey
focal_class.file: java_src/src/main/java/com/google/crypto/tink/subtle/Ed25519Sign.java
focal_class.identifier: Ed25519Sign
focal_class.interfaces: implements PublicKeySign
focal_class.class_method_signature: Ed25519Sign.Ed25519Sign(final byte[] privateKey)
focal_class.full_signature: public  Ed25519Sign(final byte[] privateKey)
focal_class.identifier: Ed25519Sign
focal_class.modifiers: public
focal_class.parameters: (final byte[] privateKey)
focal_class.signature:  Ed25519Sign(final byte[] privateKey)
focal_class.class_method_signature: Ed25519Sign.sign(final byte[] data)
focal_class.full_signature: @Override public byte[] sign(final byte[] data)
focal_class.identifier: sign
focal_class.modifiers: @Override public
focal_class.parameters: (final byte[] data)
focal_class.return: byte[]
focal_class.signature: byte[] sign(final byte[] data)
focal_method.body: @Override
    public byte[] sign(final byte[] data) throws GeneralSecurityException {
      return Ed25519.sign(data, publicKey, hashedPrivateKey);
    }
focal_method.class_method_signature: Ed25519Sign.sign(final byte[] data)
focal_method.full_signature: @Override public byte[] sign(final byte[] data)
focal_method.identifier: sign
focal_method.invocations: sign
focal_method.modifiers: @Override public
focal_method.parameters: (final byte[] data)
focal_method.return: byte[]
focal_method.signature: byte[] sign(final byte[] data)