Rhonabwy
Javascript Object Signing and Encryption (JOSE) library - JWK, JWKS, JWS, JWE and JWT
|
Functions | |
int | r_jwe_set_properties (jwe_t *jwe,...) |
jwe_t * | r_jwe_copy (jwe_t *jwe) |
int | r_jwe_set_payload (jwe_t *jwe, const unsigned char *payload, size_t payload_len) |
const unsigned char * | r_jwe_get_payload (jwe_t *jwe, size_t *payload_len) |
int | r_jwe_set_alg (jwe_t *jwe, jwa_alg alg) |
jwa_alg | r_jwe_get_alg (jwe_t *jwe) |
int | r_jwe_set_enc (jwe_t *jwe, jwa_enc enc) |
jwa_enc | r_jwe_get_enc (jwe_t *jwe) |
const char * | r_jwe_get_kid (jwe_t *jwe) |
int | r_jwe_set_header_str_value (jwe_t *jwe, const char *key, const char *str_value) |
int | r_jwe_set_header_int_value (jwe_t *jwe, const char *key, rhn_int_t i_value) |
int | r_jwe_set_header_json_t_value (jwe_t *jwe, const char *key, json_t *j_value) |
int | r_jwe_set_full_header_json_t (jwe_t *jwe, json_t *j_header) |
int | r_jwe_set_full_header_json_str (jwe_t *jwe, const char *str_header) |
int | r_jwe_set_full_unprotected_header_json_t (jwe_t *jwe, json_t *j_unprotected_header) |
int | r_jwe_set_full_unprotected_header_json_str (jwe_t *jwe, const char *str_unprotected_header) |
json_t * | r_jwe_get_full_unprotected_header_json_t (jwe_t *jwe) |
char * | r_jwe_get_full_unprotected_header_str (jwe_t *jwe) |
const char * | r_jwe_get_header_str_value (jwe_t *jwe, const char *key) |
rhn_int_t | r_jwe_get_header_int_value (jwe_t *jwe, const char *key) |
json_t * | r_jwe_get_header_json_t_value (jwe_t *jwe, const char *key) |
json_t * | r_jwe_get_full_header_json_t (jwe_t *jwe) |
char * | r_jwe_get_full_header_str (jwe_t *jwe) |
int | r_jwe_add_keys (jwe_t *jwe, jwk_t *jwk_privkey, jwk_t *jwk_pubkey) |
int | r_jwe_add_jwks (jwe_t *jwe, jwks_t *jwks_privkey, jwks_t *jwks_pubkey) |
int | r_jwe_add_keys_json_str (jwe_t *jwe, const char *privkey, const char *pubkey) |
int | r_jwe_add_keys_json_t (jwe_t *jwe, json_t *privkey, json_t *pubkey) |
int | r_jwe_add_keys_pem_der (jwe_t *jwe, int format, const unsigned char *privkey, size_t privkey_len, const unsigned char *pubkey, size_t pubkey_len) |
int | r_jwe_add_keys_gnutls (jwe_t *jwe, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey) |
int | r_jwe_add_key_symmetric (jwe_t *jwe, const unsigned char *key, size_t key_len) |
jwks_t * | r_jwe_get_jwks_privkey (jwe_t *jwe) |
jwks_t * | r_jwe_get_jwks_pubkey (jwe_t *jwe) |
int | r_jwe_set_cypher_key (jwe_t *jwe, const unsigned char *key, size_t key_len) |
const unsigned char * | r_jwe_get_cypher_key (jwe_t *jwe, size_t *key_len) |
int | r_jwe_generate_cypher_key (jwe_t *jwe) |
int | r_jwe_set_iv (jwe_t *jwe, const unsigned char *iv, size_t iv_len) |
const unsigned char * | r_jwe_get_iv (jwe_t *jwe, size_t *iv_len) |
int | r_jwe_generate_iv (jwe_t *jwe) |
int | r_jwe_set_aad (jwe_t *jwe, const unsigned char *aad, size_t aad_len) |
const unsigned char * | r_jwe_get_aad (jwe_t *jwe, size_t *aad_len) |
int | r_jwe_encrypt_payload (jwe_t *jwe) |
int | r_jwe_decrypt_payload (jwe_t *jwe) |
int | r_jwe_encrypt_key (jwe_t *jwe, jwk_t *jwk_pubkey, int x5u_flags) |
int | r_jwe_decrypt_key (jwe_t *jwe, jwk_t *jwk_privkey, int x5u_flags) |
int | r_jwe_parse (jwe_t *jwe, const char *jwe_str, int x5u_flags) |
int | r_jwe_parsen (jwe_t *jwe, const char *jwe_str, size_t jwe_str_len, int x5u_flags) |
int | r_jwe_advanced_parse (jwe_t *jwe, const char *jwe_str, uint32_t parse_flags, int x5u_flags) |
int | r_jwe_advanced_parsen (jwe_t *jwe, const char *jwe_str, size_t jwe_str_len, uint32_t parse_flags, int x5u_flags) |
int | r_jwe_compact_parse (jwe_t *jwe, const char *jwe_str, int x5u_flags) |
int | r_jwe_compact_parsen (jwe_t *jwe, const char *jwe_str, size_t jwe_str_len, int x5u_flags) |
int | r_jwe_advanced_compact_parse (jwe_t *jwe, const char *jwe_str, uint32_t parse_flags, int x5u_flags) |
int | r_jwe_advanced_compact_parsen (jwe_t *jwe, const char *jwe_str, size_t jwe_str_len, uint32_t parse_flags, int x5u_flags) |
int | r_jwe_parse_json_str (jwe_t *jwe, const char *jwe_json_str, int x5u_flags) |
int | r_jwe_parsen_json_str (jwe_t *jwe, const char *jwe_json_str, size_t jwe_json_str_len, int x5u_flags) |
int | r_jwe_parse_json_t (jwe_t *jwe, json_t *jwe_json, int x5u_flags) |
int | r_jwe_advanced_parse_json_str (jwe_t *jwe, const char *jwe_json_str, uint32_t parse_flags, int x5u_flags) |
int | r_jwe_advanced_parsen_json_str (jwe_t *jwe, const char *jwe_json_str, size_t jwe_json_str_len, uint32_t parse_flags, int x5u_flags) |
int | r_jwe_advanced_parse_json_t (jwe_t *jwe, json_t *jwe_json, uint32_t parse_flags, int x5u_flags) |
jwe_t * | r_jwe_quick_parse (const char *jwe_str, uint32_t parse_flags, int x5u_flags) |
jwe_t * | r_jwe_quick_parsen (const char *jwe_str, size_t jwe_str_len, uint32_t parse_flags, int x5u_flags) |
int | r_jwe_decrypt (jwe_t *jwe, jwk_t *jwk_privkey, int x5u_flags) |
char * | r_jwe_serialize (jwe_t *jwe, jwk_t *jwk_pubkey, int x5u_flags) |
char * | r_jwe_serialize_json_str (jwe_t *jwe, jwks_t *jwks_pubkey, int x5u_flags, int mode) |
json_t * | r_jwe_serialize_json_t (jwe_t *jwe, jwks_t *jwks_pubkey, int x5u_flags, int mode) |
Manage JSON Web Encryption
Adds private and/or public keys sets for the cypher key encryption and decryption
jwe | the jwe_t to update |
jwks_privkey | the private key set in jwks_t * format, can be NULL |
jwks_pubkey | the public key set in jwks_t * format, can be NULL |
int r_jwe_add_key_symmetric | ( | jwe_t * | jwe, |
const unsigned char * | key, | ||
size_t | key_len | ||
) |
Add symmetric key by value to perform encryption ot decryption
jwe | the jwe_t to update |
key | the raw key value |
key_len | the length of the key |
Adds private and/or public keys for the cypher key encryption and decryption
jwe | the jwe_t to update |
jwk_privkey | the private key in jwk_t * format, can be NULL |
jwk_pubkey | the public key in jwk_t * format, can be NULL |
int r_jwe_add_keys_gnutls | ( | jwe_t * | jwe, |
gnutls_privkey_t | privkey, | ||
gnutls_pubkey_t | pubkey | ||
) |
Add keys to perform encryption ot decryption keys must be gnutls key structures
jwe | the jwe_t to update |
privkey | the private key to enc the |
pubkey | the public key to verify the encature |
int r_jwe_add_keys_json_str | ( | jwe_t * | jwe, |
const char * | privkey, | ||
const char * | pubkey | ||
) |
Add keys to perform encryption ot decryption keys must be a JWK stringified
jwe | the jwe_t to update |
privkey | the private key to enc the |
pubkey | the public key to verify the encature |
int r_jwe_add_keys_json_t | ( | jwe_t * | jwe, |
json_t * | privkey, | ||
json_t * | pubkey | ||
) |
Add keys to perform encryption ot decryption keys must be a JWK in json_t * format
jwe | the jwe_t to update |
privkey | the private key to enc the |
pubkey | the public key to verify the encature |
int r_jwe_add_keys_pem_der | ( | jwe_t * | jwe, |
int | format, | ||
const unsigned char * | privkey, | ||
size_t | privkey_len, | ||
const unsigned char * | pubkey, | ||
size_t | pubkey_len | ||
) |
Add keys to perform encryption ot decryption keys must be in PEM or DER format
jwe | the jwe_t to update |
format | the format of the input, values available are R_FORMAT_PEM or R_FORMAT_DER |
privkey | the private key to sign the |
privkey_len | length of privkey |
pubkey | the public key to verify the signature |
pubkey_len | length of pubkey |
int r_jwe_advanced_compact_parse | ( | jwe_t * | jwe, |
const char * | jwe_str, | ||
uint32_t | parse_flags, | ||
int | x5u_flags | ||
) |
Parses the JWE in compact mode (xxx.yyy.zzz.aaa.bbb)
jwe | the jwe_t to update |
jwe_str | the jwe serialized to parse, must end with a NULL string terminator |
parse_flags | Flags to set or unset options Flags available are
|
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
int r_jwe_advanced_compact_parsen | ( | jwe_t * | jwe, |
const char * | jwe_str, | ||
size_t | jwe_str_len, | ||
uint32_t | parse_flags, | ||
int | x5u_flags | ||
) |
Parses the JWE in compact mode (xxx.yyy.zzz.aaa.bbb)
jwe | the jwe_t to update |
jwe_str | the jwe serialized to parse |
jwe_str_len | the length of jwe_str |
parse_flags | Flags to set or unset options Flags available are
|
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
int r_jwe_advanced_parse | ( | jwe_t * | jwe, |
const char * | jwe_str, | ||
uint32_t | parse_flags, | ||
int | x5u_flags | ||
) |
Parses the JWE in all modes (compact, flattened or general)
jwe | the jwe_t to update |
jwe_str | the jwe serialized to parse, must end with a NULL string terminator |
parse_flags | Flags to set or unset options Flags available are
|
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
int r_jwe_advanced_parse_json_str | ( | jwe_t * | jwe, |
const char * | jwe_json_str, | ||
uint32_t | parse_flags, | ||
int | x5u_flags | ||
) |
Parses the serialized JWE in JSON mode, general or flattened
jwe | the jwe_t to update |
jwe_json_str | the serialized JWE to parse in char * format, must end with a NULL string terminator |
parse_flags | Flags to set or unset options Flags available are
|
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
int r_jwe_advanced_parse_json_t | ( | jwe_t * | jwe, |
json_t * | jwe_json, | ||
uint32_t | parse_flags, | ||
int | x5u_flags | ||
) |
Parses the serialized JWE in JSON mode, general or flattened
jwe | the jwe_t to update |
jwe_json | the serialized JWE to parse in json_t * format |
parse_flags | Flags to set or unset options Flags available are
|
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
int r_jwe_advanced_parsen | ( | jwe_t * | jwe, |
const char * | jwe_str, | ||
size_t | jwe_str_len, | ||
uint32_t | parse_flags, | ||
int | x5u_flags | ||
) |
Parses the JWE in all modes (compact, flattened or general)
jwe | the jwe_t to update |
jwe_str | the jwe serialized to parse |
jwe_str_len | the length of jwe_str |
parse_flags | Flags to set or unset options Flags available are
|
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
int r_jwe_advanced_parsen_json_str | ( | jwe_t * | jwe, |
const char * | jwe_json_str, | ||
size_t | jwe_json_str_len, | ||
uint32_t | parse_flags, | ||
int | x5u_flags | ||
) |
Parses the serialized JWE in JSON mode, general or flattened
jwe | the jwe_t to update |
jwe_json_str | the serialized JWE to parse in char * format |
jwe_json_str_len | the length of jwe_json_str |
parse_flags | Flags to set or unset options Flags available are
|
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
int r_jwe_compact_parse | ( | jwe_t * | jwe, |
const char * | jwe_str, | ||
int | x5u_flags | ||
) |
Parses the JWE in compact mode (xxx.yyy.zzz.aaa.bbb)
jwe | the jwe_t to update |
jwe_str | the jwe serialized to parse, must end with a NULL string terminator |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
int r_jwe_compact_parsen | ( | jwe_t * | jwe, |
const char * | jwe_str, | ||
size_t | jwe_str_len, | ||
int | x5u_flags | ||
) |
Parses the JWE in compact mode (xxx.yyy.zzz.aaa.bbb)
jwe | the jwe_t to update |
jwe_str | the jwe serialized to parse |
jwe_str_len | the length of jwe_str |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
Decrypts the payload of the JWE
jwe | the jwe_t to update |
jwk_privkey | the private key to decrypt cypher key, can be NULL if jwe already contains a private key |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
Decrypts the key
jwe | the jwe_t to update |
jwk_privkey | the jwk to decrypt the key, may be NULL |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
int r_jwe_decrypt_payload | ( | jwe_t * | jwe | ) |
Decrypts the payload using its key and iv
jwe | the jwe_t to update |
Encrypts the key
jwe | the jwe_t to update |
jwk_pubkey | the jwk to encrypt the key, may be NULL |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
int r_jwe_encrypt_payload | ( | jwe_t * | jwe | ) |
Encrypts the payload using its key and iv
jwe | the jwe_t to update |
int r_jwe_generate_cypher_key | ( | jwe_t * | jwe | ) |
Generates a random cypher key
jwe | the jwe_t to update |
int r_jwe_generate_iv | ( | jwe_t * | jwe | ) |
Generates a random Initialization Vector (iv)
jwe | the jwe_t to update |
const unsigned char * r_jwe_get_aad | ( | jwe_t * | jwe, |
size_t * | aad_len | ||
) |
Gets the Additional Authenticated Data (aad)
jwe | the jwe_t to get the value |
aad_len | set the size of the aad, may be NULL |
const unsigned char * r_jwe_get_cypher_key | ( | jwe_t * | jwe, |
size_t * | key_len | ||
) |
Gets the cypher key to encrypt or decrypt the payload
jwe | the jwe_t to get the value |
key_len | set the size of the key, may be NULL |
Get the JWE enc used for payload encryption
jwe | the jwe_t to update |
json_t * r_jwe_get_full_header_json_t | ( | jwe_t * | jwe | ) |
Return the full JWE header in JSON format
jwe | the jwe_t to get the value |
char * r_jwe_get_full_header_str | ( | jwe_t * | jwe | ) |
Return the full JWE header in char *
jwe | the jwe_t to get the value |
json_t * r_jwe_get_full_unprotected_header_json_t | ( | jwe_t * | jwe | ) |
Return the full JWS unprotected header in JSON format
jwe | the jwe_t to get the value |
char * r_jwe_get_full_unprotected_header_str | ( | jwe_t * | jwe | ) |
Return the full JWS unprotected header in char *
jwe | the jwe_t to get the value |
Gets an integer value from the JWE header
jwe | the jwe_t to get the value |
key | the key to retreive the value |
json_t * r_jwe_get_header_json_t_value | ( | jwe_t * | jwe, |
const char * | key | ||
) |
Gets a JSON value from the JWE header
jwe | the jwe_t to get the value |
key | the key to retreive the value |
const char * r_jwe_get_header_str_value | ( | jwe_t * | jwe, |
const char * | key | ||
) |
Gets a string value from the JWE header
jwe | the jwe_t to get the value |
key | the key to retreive the value |
const unsigned char * r_jwe_get_iv | ( | jwe_t * | jwe, |
size_t * | iv_len | ||
) |
Gets the Initialization Vector (iv)
jwe | the jwe_t to get the value |
iv_len | set the size of the iv, may be NULL |
Get private keys set for the cypher key decryption
jwe | the jwe_t to get the value |
Get public keys set for the cypher key encryption
jwe | the jwe_t to get the value |
const char * r_jwe_get_kid | ( | jwe_t * | jwe | ) |
Get the KID specified in the header for payload encryption
jwe | the jwe_t to update |
const unsigned char * r_jwe_get_payload | ( | jwe_t * | jwe, |
size_t * | payload_len | ||
) |
Get the JWE payload
jwe | the jwe_t to get the payload from |
payload_len | the length of the JWE payload, may be NULL |
int r_jwe_parse | ( | jwe_t * | jwe, |
const char * | jwe_str, | ||
int | x5u_flags | ||
) |
Parses the JWE in all modes (compact, flattened or general)
jwe | the jwe_t to update |
jwe_str | the jwe serialized to parse, must end with a NULL string terminator |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
int r_jwe_parse_json_str | ( | jwe_t * | jwe, |
const char * | jwe_json_str, | ||
int | x5u_flags | ||
) |
Parses the serialized JWE in JSON mode, general or flattened
jwe | the jwe_t to update |
jwe_json_str | the serialized JWE to parse in char * format, must end with a NULL string terminator |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
int r_jwe_parse_json_t | ( | jwe_t * | jwe, |
json_t * | jwe_json, | ||
int | x5u_flags | ||
) |
Parses the serialized JWE in JSON mode, general or flattened
jwe | the jwe_t to update |
jwe_json | the serialized JWE to parse in json_t * format |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
int r_jwe_parsen | ( | jwe_t * | jwe, |
const char * | jwe_str, | ||
size_t | jwe_str_len, | ||
int | x5u_flags | ||
) |
Parses the JWE in all modes (compact, flattened or general)
jwe | the jwe_t to update |
jwe_str | the jwe serialized to parse |
jwe_str_len | the length of jwe_str |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
int r_jwe_parsen_json_str | ( | jwe_t * | jwe, |
const char * | jwe_json_str, | ||
size_t | jwe_json_str_len, | ||
int | x5u_flags | ||
) |
Parses the serialized JWE in JSON mode, general or flattened
jwe | the jwe_t to update |
jwe_json_str | the serialized JWE to parse in char * format |
jwe_json_str_len | the length of jwe_json_str |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
jwe_t * r_jwe_quick_parse | ( | const char * | jwe_str, |
uint32_t | parse_flags, | ||
int | x5u_flags | ||
) |
Parses the JWE in all modes (compact, flattened or general)
jwe_str | the jwe serialized to parse |
x5u_flags | Flags to retrieve x5u certificates |
parse_flags | Flags to set or unset options Flags available are
|
jwe_t * r_jwe_quick_parsen | ( | const char * | jwe_str, |
size_t | jwe_str_len, | ||
uint32_t | parse_flags, | ||
int | x5u_flags | ||
) |
Parses the JWE in all modes (compact, flattened or general)
jwe_str | the jwe serialized to parse |
jwe_str_len | the length of jwe_str |
parse_flags | Flags to set or unset options Flags available are
|
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
Serialize a JWE into its string format (aaa.bbb.ccc.xxx.yyy.zzz)
jwe | the JWE to serialize |
jwk_pubkey | the public key to encrypt the cypher key, can be NULL if jwe already contains a public key |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
Serialize a JWE into its JSON format (general or flattened) Mode general: Multiple encryptions are generated. You can use the jwe pubkeys or specify the public keys Every jwk used to encrypt the key must have a property 'alg' to specify the encryption algorithm It is recommended, but not mandatory, to use JWKs with kid property
jwe | the JWE to serialize |
jwks_pubkey | the public keys to use to sign the JWE can be NULL if jwe already contains a public key set |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
mode | JSON serialization mode Values available are
|
Serialize a JWE into its JSON format (general or flattened) Mode general: Multiple encryptions are generated. You can use the jwe pubkeys or specify the public keys Every jwk used to encrypt the key must have a property 'alg' to specify the encryption algorithm It is recommended, but not mandatory, to use JWKs with kid property
jwe | the JWE to serialize |
jwks_pubkey | the public keys to use to sign the JWE can be NULL if jwe already contains a public key set |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
mode | JSON serialization mode Values available are
|
int r_jwe_set_aad | ( | jwe_t * | jwe, |
const unsigned char * | aad, | ||
size_t | aad_len | ||
) |
Sets the Additional Authenticated Data (aad)
jwe | the jwe_t to update |
aad | the aad to set |
aad_len | the size of the aad |
Set the JWE alg to use for key encryption
jwe | the jwe_t to update |
alg | the algorithm to use |
int r_jwe_set_cypher_key | ( | jwe_t * | jwe, |
const unsigned char * | key, | ||
size_t | key_len | ||
) |
Sets the cypher key to encrypt or decrypt the payload
jwe | the jwe_t to update |
key | the key to encrypt or decrypt the payload |
key_len | the size of the key |
Set the JWE enc to use for payload encryption
jwe | the jwe_t to update |
enc | the encorithm to use |
int r_jwe_set_full_header_json_str | ( | jwe_t * | jwe, |
const char * | str_header | ||
) |
Sets the entire header with the stringified JSON value specified
jwe | the jwe_t to update |
str_header | the header to set, must be a stringified JSON object |
int r_jwe_set_full_header_json_t | ( | jwe_t * | jwe, |
json_t * | j_header | ||
) |
Sets the entire header with the JSON value specified
jwe | the jwe_t to update |
j_header | the header to set, must be a JSON object |
int r_jwe_set_full_unprotected_header_json_str | ( | jwe_t * | jwe, |
const char * | str_unprotected_header | ||
) |
Sets the entire unprotected header with the stringified JSON value specified The unprotected header is useful when serializing in JSON format
jwe | the jwe_t to update |
str_unprotected_header | the unprotected header to set, must be a stringified JSON object |
int r_jwe_set_full_unprotected_header_json_t | ( | jwe_t * | jwe, |
json_t * | j_unprotected_header | ||
) |
Sets the entire unprotected header with the JSON value specified The unprotected header is useful when serializing in JSON format
jwe | the jwe_t to update |
j_unprotected_header | the unprotected header to set, must be a JSON object |
Adds an integer value to the JWE header
jwe | the jwe_t to update |
key | the key to set to the JWE header |
i_value | the value to set |
int r_jwe_set_header_json_t_value | ( | jwe_t * | jwe, |
const char * | key, | ||
json_t * | j_value | ||
) |
Adds a JSON value to the JWE header
jwe | the jwe_t to update |
key | the key to set to the JWE header |
j_value | the value to set |
int r_jwe_set_header_str_value | ( | jwe_t * | jwe, |
const char * | key, | ||
const char * | str_value | ||
) |
Adds a string value to the JWE header
jwe | the jwe_t to update |
key | the key to set to the JWE header |
str_value | the value to set |
int r_jwe_set_iv | ( | jwe_t * | jwe, |
const unsigned char * | iv, | ||
size_t | iv_len | ||
) |
Sets the Initialization Vector (iv)
jwe | the jwe_t to update |
iv | the iv to set |
iv_len | the size of the iv |
int r_jwe_set_payload | ( | jwe_t * | jwe, |
const unsigned char * | payload, | ||
size_t | payload_len | ||
) |
Set the payload of the jwe
jwe | the jwe_t to update |
payload | the payload to set |
payload_len | the size of the payload |