More W32 resolver workarounds
[oweals/gnunet.git] / src / include / gnunet_crypto_lib.h
index 8bb851ff1981a5d9fb02fd37ff135ddcdf228961..a82b2fdd63d7360ac2fc3d27045e414d4e090be4 100644 (file)
@@ -110,6 +110,12 @@ enum GNUNET_CRYPTO_Quality
  */
 #define GNUNET_CRYPTO_HASH_LENGTH (512/8)
 
+/**
+ * How many characters (without 0-terminator) are our ASCII-encoded
+ * public keys (ECDSA/EDDSA/ECDHE).
+ */
+#define GNUNET_CRYPTO_PKEY_ASCII_LENGTH 52
+
 /**
  * @brief 0-terminated ASCII encoding of a struct GNUNET_HashCode.
  */
@@ -1096,6 +1102,19 @@ int
 GNUNET_CRYPTO_get_peer_identity (const struct GNUNET_CONFIGURATION_Handle *cfg,
                                  struct GNUNET_PeerIdentity *dst);
 
+/**
+ * Compare two Peer Identities.
+ *
+ * @param first first peer identity
+ * @param second second peer identity
+ * @return bigger than 0 if first > second,
+ *         0 if they are the same
+ *         smaller than 0 if second > first
+ */
+int
+GNUNET_CRYPTO_cmp_peer_identity (const struct GNUNET_PeerIdentity *first,
+                                 const struct GNUNET_PeerIdentity *second);
+
 
 /**
  * @ingroup crypto