diff options
Diffstat (limited to 'src/service/messenger/messenger_api_util.h')
-rw-r--r-- | src/service/messenger/messenger_api_util.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/service/messenger/messenger_api_util.h b/src/service/messenger/messenger_api_util.h index bad001da3..a85a12686 100644 --- a/src/service/messenger/messenger_api_util.h +++ b/src/service/messenger/messenger_api_util.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2020--2021 GNUnet e.V. | 3 | Copyright (C) 2020--2023 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software: you can redistribute it and/or modify it | 5 | GNUnet is free software: you can redistribute it and/or modify it |
6 | under the terms of the GNU Affero General Public License as published | 6 | under the terms of the GNU Affero General Public License as published |
@@ -53,6 +53,15 @@ generate_free_member_id (struct GNUNET_ShortHashCode *id, | |||
53 | const struct GNUNET_CONTAINER_MultiShortmap *members); | 53 | const struct GNUNET_CONTAINER_MultiShortmap *members); |
54 | 54 | ||
55 | /** | 55 | /** |
56 | * Returns the private identity key of #GNUNET_IDENTITY_ego_get_anonymous() without | ||
57 | * recalculating it every time. | ||
58 | * | ||
59 | * @return anonymous private key | ||
60 | */ | ||
61 | const struct GNUNET_CRYPTO_PrivateKey* | ||
62 | get_anonymous_private_key (); | ||
63 | |||
64 | /** | ||
56 | * Returns the public identity key of #GNUNET_IDENTITY_ego_get_anonymous() without | 65 | * Returns the public identity key of #GNUNET_IDENTITY_ego_get_anonymous() without |
57 | * recalculating it every time. | 66 | * recalculating it every time. |
58 | * | 67 | * |
@@ -72,7 +81,18 @@ get_anonymous_public_key (); | |||
72 | * @param[out] port CADET service port | 81 | * @param[out] port CADET service port |
73 | */ | 82 | */ |
74 | void | 83 | void |
75 | convert_messenger_key_to_port(const struct GNUNET_HashCode *key, | 84 | convert_messenger_key_to_port (const struct GNUNET_HashCode *key, |
76 | struct GNUNET_HashCode *port); | 85 | struct GNUNET_HashCode *port); |
86 | |||
87 | /** | ||
88 | * Converts a peers identity to a short hash code which can be used | ||
89 | * as id to refer to a peer via sender id as attached in messages. | ||
90 | * | ||
91 | * @param[in] identity Peer identity | ||
92 | * @param[out] id Short peer id | ||
93 | */ | ||
94 | void | ||
95 | convert_peer_identity_to_id (const struct GNUNET_PeerIdentity *identity, | ||
96 | struct GNUNET_ShortHashCode *id); | ||
77 | 97 | ||
78 | #endif //GNUNET_SERVICE_MESSENGER_UTIL_H | 98 | #endif //GNUNET_SERVICE_MESSENGER_UTIL_H |