34#define STR_INDIR(x) #x
35#define STR(x) STR_INDIR (x)
83 if ((1 != (sscanf (
did,
109 char *pkey_multibase;
119 return pkey_multibase;
141 char *pkey_multibase_str;
150 didd_json = json_pack (
151 "{s:[ss], s:s, s:[{s:s, s:s, s:s, s:s}], s:[s], s:[s]}",
153 "https://www.w3.org/ns/did/v1",
154 "https://w3id.org/security/suites/ed25519-2020/v1",
157 "verificationMethod",
161 "Ed25519VerificationKey2020",
164 "publicKeyMultibase",
172 didd_str = json_dumps (didd_json, JSON_INDENT (2));
178 json_decref (didd_json);
enum GNUNET_GenericReturnValue DID_did_to_pkey(const char *did, struct GNUNET_CRYPTO_PublicKey *pkey)
Return the public key of a DID.
char * DID_pkey_to_did_document(struct GNUNET_CRYPTO_PublicKey *pkey)
Create a did generate did object.
char * DID_pkey_to_did(struct GNUNET_CRYPTO_PublicKey *pkey)
Generate a DID for a given GNUNET public key.
char * DID_identity_to_did(struct GNUNET_IDENTITY_Ego *ego)
Generate a DID for a given gnunet EGO.
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.
char * DID_key_convert_gnunet_to_multibase_base64(struct GNUNET_CRYPTO_PublicKey *pkey)
Convert GNUNET key to a base 64 encoded public key.
helper library for DID related functions
#define MAX_DID_SPECIFIC_IDENTIFIER_LENGTH
#define GNUNET_DID_METHOD_PREFIX
static char * did
DID Attribute String.
static char * pkey
Public key of the zone to look in, in ASCII.
static struct GNUNET_CRYPTO_PublicKey pubkey
Public key of the zone to look in.
API that can be used to manipulate GNS record data.
API that can be used to store naming information on a GNUnet node;.
void GNUNET_IDENTITY_ego_get_public_key(struct GNUNET_IDENTITY_Ego *ego, struct GNUNET_CRYPTO_PublicKey *pk)
Get the identifier (public key) of an ego.
#define GNUNET_log(kind,...)
char * GNUNET_CRYPTO_public_key_to_string(const struct GNUNET_CRYPTO_PublicKey *key)
Creates a (Base32) string representation of the public key.
GNUNET_GenericReturnValue
Named constants for return values.
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_public_key_from_string(const char *str, struct GNUNET_CRYPTO_PublicKey *key)
Parses a (Base32) string representation of the public key.
@ GNUNET_ERROR_TYPE_WARNING
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_free(ptr)
Wrapper around free.
size_t GNUNET_STRINGS_base64url_encode(const void *in, size_t len, char **output)
Encode into Base64url.
Public ECC key (always for curve Ed25519) encoded in a format suitable for network transmission and E...
An identity key as per LSD0001.