diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-12-05 18:56:38 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-12-05 18:56:38 +0000 |
commit | 8ba2dddfc8ca28972519a5d5e69ccba5719558c3 (patch) | |
tree | c40ca4ac03848e0caed76d8a06e3589992690d4f /src/util/crypto_ecc.c | |
parent | 120768fde7a54d51a67330d7744376dab671535f (diff) | |
download | gnunet-8ba2dddfc8ca28972519a5d5e69ccba5719558c3.tar.gz gnunet-8ba2dddfc8ca28972519a5d5e69ccba5719558c3.zip |
- add peer cmp
Diffstat (limited to 'src/util/crypto_ecc.c')
-rw-r--r-- | src/util/crypto_ecc.c | 17 |
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 | */ | ||
1121 | int | ||
1122 | GNUNET_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 | * |