class KeyPair {

    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);
        }
    }

    public  KeyPair(EdDSAPublicKey publicKey);
    public  KeyPair(EdDSAPublicKey publicKey, EdDSAPrivateKey privateKey);

}