helper library for DID related functions More...
Go to the source code of this file.
Macros | |
#define | GNUNET_DID_METHOD_PREFIX "did:gns:" |
#define | MAX_DID_SPECIFIC_IDENTIFIER_LENGTH 59 |
Functions | |
char * | DID_pkey_to_did (struct GNUNET_CRYPTO_PublicKey *pkey) |
Return 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 *) |
Convert GNUNET key to a base 64 encoded public key. More... | |
char * | DID_pkey_to_did_document (struct GNUNET_CRYPTO_PublicKey *pkey) |
Generate the default DID document for a GNUNET public key. More... | |
char * | DID_identity_to_did_document (struct GNUNET_IDENTITY_Ego *ego) |
Generate the default DID document for a GNUNET ego. More... | |
helper library for DID related functions
Definition in file did_helper.h.
#define GNUNET_DID_METHOD_PREFIX "did:gns:" |
Definition at line 27 of file did_helper.h.
#define MAX_DID_SPECIFIC_IDENTIFIER_LENGTH 59 |
Definition at line 28 of file did_helper.h.
char * DID_pkey_to_did | ( | struct GNUNET_CRYPTO_PublicKey * | pkey | ) |
Return 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.
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 | ) |
Generate the default DID document for a GNUNET public key.
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.
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.