Add support for signatures

This commit is contained in:
Gabriella Gonzalez
2022-06-15 15:40:13 -07:00
parent 8e9c9198fe
commit 9e5e5f45f3
5 changed files with 114 additions and 14 deletions

View File

@@ -146,4 +146,16 @@ void freePathInfo(struct PathInfo * const input)
freeStrings(&input->sigs);
}
// TODO: This can be done in Haskell using the `ed25519` package
void signString
( char const * const secretKey
, char const * const message
, struct string * const output
)
{
std::string signature = SecretKey(secretKey).signDetached(message);
copyString(signature, output);
}
}