]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Note some functions that should move or be merged
authorNick Mathewson <nickm@torproject.org>
Tue, 26 May 2015 20:09:34 +0000 (16:09 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 28 May 2015 14:47:47 +0000 (10:47 -0400)
src/common/crypto.c
src/common/crypto_ed25519.h

index 05dc43213ce519e5ac342ce2d7e10ec674fa8936..2ccff80c7b6b9b2665b49b7471eea9a6abee6699 100644 (file)
@@ -2924,6 +2924,7 @@ base64_decode(char *dest, size_t destlen, const char *src, size_t srclen)
 /** 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)
 {
@@ -2937,6 +2938,7 @@ 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)
 {
@@ -2962,6 +2964,7 @@ 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)
 {
@@ -2975,6 +2978,7 @@ 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)
 {
index 79b3db8f9aa6945966f77a5dd8b43bf40f493477..8ffb9f26f3953ceaf3b58d01469099a2ba67096d 100644 (file)
@@ -88,13 +88,15 @@ int ed25519_public_blind(ed25519_public_key_t *out,
                          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,