test_class.declarator: SEED = "1123740522f11bfef6b3671f51e159ccf589ccf8965262dd5f97d1721d383dd4"
test_class.modifier: private static final
test_class.original_string: private static final String SEED = "1123740522f11bfef6b3671f51e159ccf589ccf8965262dd5f97d1721d383dd4";
test_class.type: String
test_class.var_name: SEED
test_class.file: kin-sdk/kin-base/src/test/java/kin/base/KeyPairTest.java
test_class.identifier: KeyPairTest
test_case.body: @Test
      public void testSign() {
          String expectedSig = "587d4b472eeef7d07aafcd0b049640b0bb3f39784118c2e2b73a04fa2f64c9c538b4b2d0f5335e968a480021fdc23e98c0ddf424cb15d8131df8cb6c4bb58309";
          KeyPair keypair = KeyPair.fromSecretSeed(Util.hexToBytes(SEED));
          String data = "hello world";
          byte[] sig = keypair.sign(data.getBytes());
          Assert.assertArrayEquals(Util.hexToBytes(expectedSig), sig);
      }
test_case.class_method_signature: KeyPairTest.testSign()
test_case.full_signature: @Test public void testSign()
test_case.identifier: testSign
test_case.invocations: fromSecretSeed hexToBytes sign getBytes assertArrayEquals hexToBytes
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSign()
focal_class.declarator: ed25519 = EdDSANamedCurveTable.ED_25519_CURVE_SPEC
focal_class.modifier: private static final
focal_class.original_string: private static final EdDSANamedCurveSpec ed25519 = EdDSANamedCurveTable.ED_25519_CURVE_SPEC;
focal_class.type: EdDSANamedCurveSpec
focal_class.var_name: ed25519
focal_class.declarator: mPublicKey
focal_class.modifier: private final
focal_class.original_string: private final EdDSAPublicKey mPublicKey;
focal_class.type: EdDSAPublicKey
focal_class.var_name: mPublicKey
focal_class.declarator: mPrivateKey
focal_class.modifier: private final
focal_class.original_string: private final EdDSAPrivateKey mPrivateKey;
focal_class.type: EdDSAPrivateKey
focal_class.var_name: mPrivateKey
focal_class.file: kin-sdk/kin-base/src/main/java/kin/base/KeyPair.java
focal_class.identifier: KeyPair
focal_class.class_method_signature: KeyPair.KeyPair(EdDSAPublicKey publicKey)
focal_class.full_signature: public  KeyPair(EdDSAPublicKey publicKey)
focal_class.identifier: KeyPair
focal_class.modifiers: public
focal_class.parameters: (EdDSAPublicKey publicKey)
focal_class.signature:  KeyPair(EdDSAPublicKey publicKey)
focal_class.class_method_signature: KeyPair.KeyPair(EdDSAPublicKey publicKey, EdDSAPrivateKey privateKey)
focal_class.full_signature: public  KeyPair(EdDSAPublicKey publicKey, EdDSAPrivateKey privateKey)
focal_class.identifier: KeyPair
focal_class.modifiers: public
focal_class.parameters: (EdDSAPublicKey publicKey, EdDSAPrivateKey privateKey)
focal_class.signature:  KeyPair(EdDSAPublicKey publicKey, EdDSAPrivateKey privateKey)
focal_class.class_method_signature: KeyPair.canSign()
focal_class.full_signature: public boolean canSign()
focal_class.identifier: canSign
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean canSign()
focal_class.class_method_signature: KeyPair.fromSecretSeed(char[] seed)
focal_class.full_signature: public static KeyPair fromSecretSeed(char[] seed)
focal_class.identifier: fromSecretSeed
focal_class.modifiers: public static
focal_class.parameters: (char[] seed)
focal_class.return: KeyPair
focal_class.signature: KeyPair fromSecretSeed(char[] seed)
focal_class.class_method_signature: KeyPair.fromSecretSeed(String seed)
focal_class.full_signature: public static KeyPair fromSecretSeed(String seed)
focal_class.identifier: fromSecretSeed
focal_class.modifiers: public static
focal_class.parameters: (String seed)
focal_class.return: KeyPair
focal_class.signature: KeyPair fromSecretSeed(String seed)
focal_class.class_method_signature: KeyPair.fromSecretSeed(byte[] seed)
focal_class.full_signature: public static KeyPair fromSecretSeed(byte[] seed)
focal_class.identifier: fromSecretSeed
focal_class.modifiers: public static
focal_class.parameters: (byte[] seed)
focal_class.return: KeyPair
focal_class.signature: KeyPair fromSecretSeed(byte[] seed)
focal_class.class_method_signature: KeyPair.fromAccountId(String accountId)
focal_class.full_signature: public static KeyPair fromAccountId(String accountId)
focal_class.identifier: fromAccountId
focal_class.modifiers: public static
focal_class.parameters: (String accountId)
focal_class.return: KeyPair
focal_class.signature: KeyPair fromAccountId(String accountId)
focal_class.class_method_signature: KeyPair.fromPublicKey(byte[] publicKey)
focal_class.full_signature: public static KeyPair fromPublicKey(byte[] publicKey)
focal_class.identifier: fromPublicKey
focal_class.modifiers: public static
focal_class.parameters: (byte[] publicKey)
focal_class.return: KeyPair
focal_class.signature: KeyPair fromPublicKey(byte[] publicKey)
focal_class.class_method_signature: KeyPair.random()
focal_class.full_signature: public static KeyPair random()
focal_class.identifier: random
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: KeyPair
focal_class.signature: KeyPair random()
focal_class.class_method_signature: KeyPair.getAccountId()
focal_class.full_signature: public String getAccountId()
focal_class.identifier: getAccountId
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getAccountId()
focal_class.class_method_signature: KeyPair.getSecretSeed()
focal_class.full_signature: public char[] getSecretSeed()
focal_class.identifier: getSecretSeed
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: char[]
focal_class.signature: char[] getSecretSeed()
focal_class.class_method_signature: KeyPair.getRawSecretSeed()
focal_class.full_signature: public byte[] getRawSecretSeed()
focal_class.identifier: getRawSecretSeed
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] getRawSecretSeed()
focal_class.class_method_signature: KeyPair.getPublicKey()
focal_class.full_signature: public byte[] getPublicKey()
focal_class.identifier: getPublicKey
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] getPublicKey()
focal_class.class_method_signature: KeyPair.getSignatureHint()
focal_class.full_signature: public SignatureHint getSignatureHint()
focal_class.identifier: getSignatureHint
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: SignatureHint
focal_class.signature: SignatureHint getSignatureHint()
focal_class.class_method_signature: KeyPair.getXdrPublicKey()
focal_class.full_signature: public PublicKey getXdrPublicKey()
focal_class.identifier: getXdrPublicKey
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: PublicKey
focal_class.signature: PublicKey getXdrPublicKey()
focal_class.class_method_signature: KeyPair.getXdrSignerKey()
focal_class.full_signature: public SignerKey getXdrSignerKey()
focal_class.identifier: getXdrSignerKey
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: SignerKey
focal_class.signature: SignerKey getXdrSignerKey()
focal_class.class_method_signature: KeyPair.fromXdrPublicKey(PublicKey key)
focal_class.full_signature: public static KeyPair fromXdrPublicKey(PublicKey key)
focal_class.identifier: fromXdrPublicKey
focal_class.modifiers: public static
focal_class.parameters: (PublicKey key)
focal_class.return: KeyPair
focal_class.signature: KeyPair fromXdrPublicKey(PublicKey key)
focal_class.class_method_signature: KeyPair.fromXdrSignerKey(SignerKey key)
focal_class.full_signature: public static KeyPair fromXdrSignerKey(SignerKey key)
focal_class.identifier: fromXdrSignerKey
focal_class.modifiers: public static
focal_class.parameters: (SignerKey key)
focal_class.return: KeyPair
focal_class.signature: KeyPair fromXdrSignerKey(SignerKey key)
focal_class.class_method_signature: KeyPair.sign(byte[] data)
focal_class.full_signature: public byte[] sign(byte[] data)
focal_class.identifier: sign
focal_class.modifiers: public
focal_class.parameters: (byte[] data)
focal_class.return: byte[]
focal_class.signature: byte[] sign(byte[] data)
focal_class.class_method_signature: KeyPair.signDecorated(byte[] data)
focal_class.full_signature: public DecoratedSignature signDecorated(byte[] data)
focal_class.identifier: signDecorated
focal_class.modifiers: public
focal_class.parameters: (byte[] data)
focal_class.return: DecoratedSignature
focal_class.signature: DecoratedSignature signDecorated(byte[] data)
focal_class.class_method_signature: KeyPair.verify(byte[] data, byte[] signature)
focal_class.full_signature: public boolean verify(byte[] data, byte[] signature)
focal_class.identifier: verify
focal_class.modifiers: public
focal_class.parameters: (byte[] data, byte[] signature)
focal_class.return: boolean
focal_class.signature: boolean verify(byte[] data, byte[] signature)
focal_class.class_method_signature: KeyPair.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_method.body: public byte[] sign(byte[] data) {
          if (mPrivateKey == null) {
              throw new RuntimeException("KeyPair does not contain secret key. Use KeyPair.fromSecretSeed method to create a new KeyPair with a secret key.");
          }
          try {
              Signature sgr = new EdDSAEngine(MessageDigest.getInstance("SHA-512"));
              sgr.initSign(mPrivateKey);
              sgr.update(data);
              return sgr.sign();
          } catch (GeneralSecurityException e) {
              throw new RuntimeException(e);
          }
      }
focal_method.class_method_signature: KeyPair.sign(byte[] data)
focal_method.full_signature: public byte[] sign(byte[] data)
focal_method.identifier: sign
focal_method.invocations: getInstance initSign update sign
focal_method.modifiers: public
focal_method.parameters: (byte[] data)
focal_method.return: byte[]
focal_method.signature: byte[] sign(byte[] data)