/** Base64 encode DIGEST_LINE bytes from <b>digest</b>, remove the trailing =
* and newline characters, and store the nul-terminated result in the first
* BASE64_DIGEST_LEN+1 bytes of <b>d64</b>. */
+/* XXXX unify with crypto_format.c code */
int
digest_to_base64(char *d64, const char *digest)
{
/** Given a base64 encoded, nul-terminated digest in <b>d64</b> (without
* trailing newline or = characters), decode it and store the result in the
* first DIGEST_LEN bytes at <b>digest</b>. */
+/* XXXX unify with crypto_format.c code */
int
digest_from_base64(char *digest, const char *d64)
{
/** Base64 encode DIGEST256_LINE bytes from <b>digest</b>, remove the
* trailing = and newline characters, and store the nul-terminated result in
* the first BASE64_DIGEST256_LEN+1 bytes of <b>d64</b>. */
+/* XXXX unify with crypto_format.c code */
int
digest256_to_base64(char *d64, const char *digest)
{
/** Given a base64 encoded, nul-terminated digest in <b>d64</b> (without
* trailing newline or = characters), decode it and store the result in the
* first DIGEST256_LEN bytes at <b>digest</b>. */
+/* XXXX unify with crypto_format.c code */
int
digest256_from_base64(char *digest, const char *d64)
{
const ed25519_public_key_t *inp,
const uint8_t *param);
-#define ED25519_BASE64_LEN 43
+/* XXXX move these to crypto_format.h */
+#define ED25519_BASE64_LEN 43
int ed25519_public_from_base64(ed25519_public_key_t *pkey,
const char *input);
int ed25519_public_to_base64(char *output,
const ed25519_public_key_t *pkey);
+/* XXXX move these to crypto_format.h */
#define ED25519_SIG_BASE64_LEN 86
int ed25519_signature_from_base64(ed25519_signature_t *sig,