CJOSE  0.6.2.2
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
23 extern "C" {
24 #endif
25 
27 extern const char *CJOSE_HDR_ALG;
28 
30 extern const char *CJOSE_HDR_ENC;
31 
33 extern const char *CJOSE_HDR_CTY;
34 
36 extern const char *CJOSE_HDR_KID;
37 
39 extern const char *CJOSE_HDR_EPK;
40 
42 extern const char *CJOSE_HDR_APU;
43 extern const char *CJOSE_HDR_APV;
44 
46 extern const char *CJOSE_HDR_ALG_NONE;
47 
49 extern const char *CJOSE_HDR_ALG_ECDH_ES;
50 
52 extern const char *CJOSE_HDR_ALG_RSA_OAEP;
53 
55 extern const char *CJOSE_HDR_ALG_RSA1_5;
56 
58 extern const char *CJOSE_HDR_ALG_A128KW;
59 extern const char *CJOSE_HDR_ALG_A192KW;
60 extern const char *CJOSE_HDR_ALG_A256KW;
61 
63 extern const char *CJOSE_HDR_ALG_PS256;
64 extern const char *CJOSE_HDR_ALG_PS384;
65 extern const char *CJOSE_HDR_ALG_PS512;
66 
68 extern const char *CJOSE_HDR_ALG_RS256;
69 extern const char *CJOSE_HDR_ALG_RS384;
70 extern const char *CJOSE_HDR_ALG_RS512;
71 
73 extern const char *CJOSE_HDR_ALG_HS256;
74 extern const char *CJOSE_HDR_ALG_HS384;
75 extern const char *CJOSE_HDR_ALG_HS512;
76 
78 extern const char *CJOSE_HDR_ALG_ES256;
79 extern const char *CJOSE_HDR_ALG_ES384;
80 extern const char *CJOSE_HDR_ALG_ES512;
81 
83 extern const char *CJOSE_HDR_ALG_DIR;
84 
86 extern const char *CJOSE_HDR_ENC_A128GCM;
87 extern const char *CJOSE_HDR_ENC_A192GCM;
88 extern const char *CJOSE_HDR_ENC_A256GCM;
89 
91 extern const char *CJOSE_HDR_ENC_A128CBC_HS256;
92 extern const char *CJOSE_HDR_ENC_A192CBC_HS384;
93 extern const char *CJOSE_HDR_ENC_A256CBC_HS512;
94 
98 typedef struct json_t cjose_header_t;
99 
109 
119 
128 
140 bool cjose_header_set(cjose_header_t *header, const char *attr, const char *value, cjose_err *err);
141 
156 const char *cjose_header_get(cjose_header_t *header, const char *attr, cjose_err *err);
157 
169 bool cjose_header_set_raw(cjose_header_t *header, const char *attr, const char *value, cjose_err *err);
170 
180 char *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
CJOSE_HDR_ALG_ES256
const char * CJOSE_HDR_ALG_ES256
CJOSE_HDR_ENC_A128GCM
const char * CJOSE_HDR_ENC_A128GCM
cjose_header_release
void cjose_header_release(cjose_header_t *header)
CJOSE_HDR_APU
const char * CJOSE_HDR_APU
cjose_header_retain
cjose_header_t * cjose_header_retain(cjose_header_t *header)
CJOSE_HDR_ALG_PS256
const char * CJOSE_HDR_ALG_PS256
CJOSE_HDR_ALG_RSA_OAEP
const char * CJOSE_HDR_ALG_RSA_OAEP
CJOSE_HDR_ALG_DIR
const char * CJOSE_HDR_ALG_DIR
cjose_header_set
bool cjose_header_set(cjose_header_t *header, const char *attr, const char *value, cjose_err *err)
CJOSE_HDR_ALG_NONE
const char * CJOSE_HDR_ALG_NONE
CJOSE_HDR_ENC
const char * CJOSE_HDR_ENC
CJOSE_HDR_EPK
const char * CJOSE_HDR_EPK
cjose_header_get
const char * cjose_header_get(cjose_header_t *header, const char *attr, cjose_err *err)
CJOSE_HDR_ALG_RS256
const char * CJOSE_HDR_ALG_RS256
CJOSE_HDR_ALG
const char * CJOSE_HDR_ALG
error.h
Datatypes and functions for error reporting.
CJOSE_HDR_ALG_RSA1_5
const char * CJOSE_HDR_ALG_RSA1_5
CJOSE_HDR_ALG_HS256
const char * CJOSE_HDR_ALG_HS256
CJOSE_HDR_ALG_A128KW
const char * CJOSE_HDR_ALG_A128KW
cjose_err
Definition: error.h:66
CJOSE_HDR_ALG_ECDH_ES
const char * CJOSE_HDR_ALG_ECDH_ES
cjose_header_new
cjose_header_t * cjose_header_new(cjose_err *err)
CJOSE_HDR_ENC_A128CBC_HS256
const char * CJOSE_HDR_ENC_A128CBC_HS256
cjose_header_t
struct json_t cjose_header_t
Definition: header.h:98
CJOSE_HDR_CTY
const char * CJOSE_HDR_CTY
CJOSE_HDR_KID
const char * CJOSE_HDR_KID
cjose_header_set_raw
bool cjose_header_set_raw(cjose_header_t *header, const char *attr, const char *value, cjose_err *err)
cjose_header_get_raw
char * cjose_header_get_raw(cjose_header_t *header, const char *attr, cjose_err *err)