aboutsummaryrefslogtreecommitdiff
path: root/src/messenger/messenger_api_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/messenger/messenger_api_util.h')
-rw-r--r--src/messenger/messenger_api_util.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/messenger/messenger_api_util.h b/src/messenger/messenger_api_util.h
index 3d68505a8..f50abf445 100644
--- a/src/messenger/messenger_api_util.h
+++ b/src/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 */
61const struct GNUNET_IDENTITY_PrivateKey*
62get_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 *
@@ -75,4 +84,15 @@ void
75convert_messenger_key_to_port(const struct GNUNET_HashCode *key, 84convert_messenger_key_to_port(const struct GNUNET_HashCode *key,
76 struct GNUNET_HashCode *port); 85 struct GNUNET_HashCode *port);
77 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 */
94void
95convert_peer_identity_to_id(const struct GNUNET_PeerIdentity *identity,
96 struct GNUNET_ShortHashCode *id);
97
78#endif //GNUNET_SERVICE_MESSENGER_UTIL_H 98#endif //GNUNET_SERVICE_MESSENGER_UTIL_H