CJOSE 0.6.2.3
Loading...
Searching...
No Matches
header.h
Go to the documentation of this file.
1/*
2 * Copyrights
3 *
4 * Portions created or assigned to Cisco Systems, Inc. are
5 * Copyright (c) 2014-2016 Cisco Systems, Inc. All Rights Reserved.
6 */
7
16#ifndef CJOSE_HEADER_H
17#define CJOSE_HEADER_H
18
19#include <stdbool.h>
20#include "cjose/error.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
27extern const char *CJOSE_HDR_ALG;
28
30extern const char *CJOSE_HDR_ENC;
31
33extern const char *CJOSE_HDR_CTY;
34
36extern const char *CJOSE_HDR_KID;
37
39extern const char *CJOSE_HDR_EPK;
40
42extern const char *CJOSE_HDR_APU;
43extern const char *CJOSE_HDR_APV;
44
46extern const char *CJOSE_HDR_ALG_NONE;
47
49extern const char *CJOSE_HDR_ALG_ECDH_ES;
50
52extern const char *CJOSE_HDR_ALG_RSA_OAEP;
53
55extern const char *CJOSE_HDR_ALG_RSA1_5;
56
58extern const char *CJOSE_HDR_ALG_A128KW;
59extern const char *CJOSE_HDR_ALG_A192KW;
60extern const char *CJOSE_HDR_ALG_A256KW;
61
63extern const char *CJOSE_HDR_ALG_PS256;
64extern const char *CJOSE_HDR_ALG_PS384;
65extern const char *CJOSE_HDR_ALG_PS512;
66
68extern const char *CJOSE_HDR_ALG_RS256;
69extern const char *CJOSE_HDR_ALG_RS384;
70extern const char *CJOSE_HDR_ALG_RS512;
71
73extern const char *CJOSE_HDR_ALG_HS256;
74extern const char *CJOSE_HDR_ALG_HS384;
75extern const char *CJOSE_HDR_ALG_HS512;
76
78extern const char *CJOSE_HDR_ALG_ES256;
79extern const char *CJOSE_HDR_ALG_ES384;
80extern const char *CJOSE_HDR_ALG_ES512;
81
83extern const char *CJOSE_HDR_ALG_DIR;
84
86extern const char *CJOSE_HDR_ENC_A128GCM;
87extern const char *CJOSE_HDR_ENC_A192GCM;
88extern const char *CJOSE_HDR_ENC_A256GCM;
89
91extern const char *CJOSE_HDR_ENC_A128CBC_HS256;
92extern const char *CJOSE_HDR_ENC_A192CBC_HS384;
93extern const char *CJOSE_HDR_ENC_A256CBC_HS512;
94
98typedef struct json_t cjose_header_t;
99
109
119
128
140bool cjose_header_set(cjose_header_t *header, const char *attr, const char *value, cjose_err *err);
141
156const char *cjose_header_get(cjose_header_t *header, const char *attr, cjose_err *err);
157
169bool cjose_header_set_raw(cjose_header_t *header, const char *attr, const char *value, cjose_err *err);
170
180char *cjose_header_get_raw(cjose_header_t *header, const char *attr, cjose_err *err);
181
182#ifdef __cplusplus
183}
184#endif
185
186#endif // CJOSE_HEADER_H
Datatypes and functions for error reporting.
const char * CJOSE_HDR_ENC_A128GCM
const char * CJOSE_HDR_CTY
const char * CJOSE_HDR_ALG_NONE
const char * cjose_header_get(cjose_header_t *header, const char *attr, cjose_err *err)
const char * CJOSE_HDR_KID
const char * CJOSE_HDR_ALG_ES256
const char * CJOSE_HDR_ENC_A128CBC_HS256
cjose_header_t * cjose_header_new(cjose_err *err)
const char * CJOSE_HDR_ENC
char * cjose_header_get_raw(cjose_header_t *header, const char *attr, cjose_err *err)
const char * CJOSE_HDR_ALG_HS256
const char * CJOSE_HDR_APU
cjose_header_t * cjose_header_retain(cjose_header_t *header)
const char * CJOSE_HDR_ALG_RS256
void cjose_header_release(cjose_header_t *header)
const char * CJOSE_HDR_ALG_PS256
const char * CJOSE_HDR_EPK
bool cjose_header_set_raw(cjose_header_t *header, const char *attr, const char *value, cjose_err *err)
const char * CJOSE_HDR_ALG_A128KW
const char * CJOSE_HDR_ALG_RSA1_5
struct json_t cjose_header_t
Definition header.h:98
const char * CJOSE_HDR_ALG
bool cjose_header_set(cjose_header_t *header, const char *attr, const char *value, cjose_err *err)
const char * CJOSE_HDR_ALG_ECDH_ES
const char * CJOSE_HDR_ALG_RSA_OAEP
const char * CJOSE_HDR_ALG_DIR
Definition error.h:67