aboutsummaryrefslogtreecommitdiff
path: root/src/util/crypto_ecc.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-12-05 18:56:38 +0000
committerBart Polot <bart@net.in.tum.de>2013-12-05 18:56:38 +0000
commit8ba2dddfc8ca28972519a5d5e69ccba5719558c3 (patch)
treec40ca4ac03848e0caed76d8a06e3589992690d4f /src/util/crypto_ecc.c
parent120768fde7a54d51a67330d7744376dab671535f (diff)
downloadgnunet-8ba2dddfc8ca28972519a5d5e69ccba5719558c3.tar.gz
gnunet-8ba2dddfc8ca28972519a5d5e69ccba5719558c3.zip
- add peer cmp
Diffstat (limited to 'src/util/crypto_ecc.c')
-rw-r--r--src/util/crypto_ecc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c
index c5e3b1008..0c9b2fcd7 100644
--- a/src/util/crypto_ecc.c
+++ b/src/util/crypto_ecc.c
@@ -1110,6 +1110,23 @@ GNUNET_CRYPTO_get_peer_identity (const struct GNUNET_CONFIGURATION_Handle *cfg,
1110 1110
1111 1111
1112/** 1112/**
1113 * Compare two Peer Identities.
1114 *
1115 * @param first first peer identity
1116 * @param second second peer identity
1117 * @return bigger than 0 if first > second,
1118 * 0 if they are the same
1119 * smaller than 0 if second > first
1120 */
1121int
1122GNUNET_CRYPTO_cmp_peer_identity (const struct GNUNET_PeerIdentity *first,
1123 const struct GNUNET_PeerIdentity *second)
1124{
1125 return memcmp (first, second, sizeof (struct GNUNET_PeerIdentity));
1126}
1127
1128
1129/**
1113 * Convert the data specified in the given purpose argument to an 1130 * Convert the data specified in the given purpose argument to an
1114 * S-expression suitable for signature operations. 1131 * S-expression suitable for signature operations.
1115 * 1132 *