helper library for DID related functions More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_namestore_service.h"
#include "gnunet_gns_service.h"
#include "gnunet_gnsrecord_lib.h"
#include "did_helper.h"
#include "jansson.h"
Go to the source code of this file.
Macros | |
#define | STR_INDIR(x) #x |
#define | STR(x) STR_INDIR (x) |
Functions | |
char * | DID_pkey_to_did (struct GNUNET_CRYPTO_PublicKey *pkey) |
Generate a DID for a given GNUNET public key. More... | |
char * | DID_identity_to_did (struct GNUNET_IDENTITY_Ego *ego) |
Generate a DID for a given gnunet EGO. More... | |
enum GNUNET_GenericReturnValue | DID_did_to_pkey (const char *did, struct GNUNET_CRYPTO_PublicKey *pkey) |
Return the public key of a DID. More... | |
char * | DID_key_convert_gnunet_to_multibase_base64 (struct GNUNET_CRYPTO_PublicKey *pkey) |
Convert GNUNET key to a base 64 encoded public key. More... | |
char * | DID_pkey_to_did_document (struct GNUNET_CRYPTO_PublicKey *pkey) |
Create a did generate did object. More... | |
char * | DID_identity_to_did_document (struct GNUNET_IDENTITY_Ego *ego) |
Generate the default DID document for a GNUNET ego Wrapper around GNUNET_DID_pkey_to_did_document. More... | |
helper library for DID related functions
Definition in file did_helper.c.
#define STR_INDIR | ( | x | ) | #x |
Definition at line 34 of file did_helper.c.
#define STR | ( | x | ) | STR_INDIR (x) |
Definition at line 35 of file did_helper.c.
char * DID_pkey_to_did | ( | struct GNUNET_CRYPTO_PublicKey * | pkey | ) |
Generate a DID for a given GNUNET public key.
Return a DID for a given GNUNET public key.
pkey |
Definition at line 45 of file did_helper.c.
References GNUNET_asprintf(), GNUNET_CRYPTO_public_key_to_string(), GNUNET_DID_METHOD_PREFIX, GNUNET_free, and pkey.
Referenced by DID_identity_to_did(), DID_identity_to_did_document(), and DID_pkey_to_did_document().
char * DID_identity_to_did | ( | struct GNUNET_IDENTITY_Ego * | ego | ) |
Generate a DID for a given gnunet EGO.
Wrapper around GNUNET_DID_pkey_to_did
ego |
Definition at line 67 of file did_helper.c.
References DID_pkey_to_did(), GNUNET_IDENTITY_ego_get_public_key(), and pkey.
Referenced by create_did_ego_lockup_cb(), and process_dids().
enum GNUNET_GenericReturnValue DID_did_to_pkey | ( | const char * | did, |
struct GNUNET_CRYPTO_PublicKey * | pkey | ||
) |
Return the public key of a DID.
Definition at line 79 of file did_helper.c.
References did, GNUNET_CRYPTO_public_key_from_string(), GNUNET_DID_METHOD_PREFIX, GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_NO, GNUNET_OK, MAX_DID_SPECIFIC_IDENTIFIER_LENGTH, pkey, and STR.
Referenced by DID_resolve().
char * DID_key_convert_gnunet_to_multibase_base64 | ( | struct GNUNET_CRYPTO_PublicKey * | pkey | ) |
Convert GNUNET key to a base 64 encoded public key.
Definition at line 101 of file did_helper.c.
References GNUNET_asprintf(), GNUNET_free, GNUNET_STRINGS_base64url_encode(), pkey, and pubkey.
Referenced by DID_pkey_to_did_document().
char * DID_pkey_to_did_document | ( | struct GNUNET_CRYPTO_PublicKey * | pkey | ) |
Create a did generate did object.
Generate the default DID document for a GNUNET public key.
pkey |
Definition at line 129 of file did_helper.c.
References DID_key_convert_gnunet_to_multibase_base64(), DID_pkey_to_did(), GNUNET_asprintf(), GNUNET_free, and pkey.
Referenced by DID_create_namestore_lookup_cb().
char * DID_identity_to_did_document | ( | struct GNUNET_IDENTITY_Ego * | ego | ) |
Generate the default DID document for a GNUNET ego Wrapper around GNUNET_DID_pkey_to_did_document.
Generate the default DID document for a GNUNET ego.
Definition at line 188 of file did_helper.c.
References DID_pkey_to_did(), GNUNET_IDENTITY_ego_get_public_key(), and pkey.