CJOSE  0.5.1
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_ALG_NONE;
40 
42 extern const char *CJOSE_HDR_ALG_RSA_OAEP;
43 
45 extern const char *CJOSE_HDR_ALG_RSA1_5;
46 
48 extern const char *CJOSE_HDR_ALG_A128KW;
49 extern const char *CJOSE_HDR_ALG_A192KW;
50 extern const char *CJOSE_HDR_ALG_A256KW;
51 
53 extern const char *CJOSE_HDR_ALG_PS256;
54 extern const char *CJOSE_HDR_ALG_PS384;
55 extern const char *CJOSE_HDR_ALG_PS512;
56 
58 extern const char *CJOSE_HDR_ALG_RS256;
59 extern const char *CJOSE_HDR_ALG_RS384;
60 extern const char *CJOSE_HDR_ALG_RS512;
61 
63 extern const char *CJOSE_HDR_ALG_HS256;
64 extern const char *CJOSE_HDR_ALG_HS384;
65 extern const char *CJOSE_HDR_ALG_HS512;
66 
68 extern const char *CJOSE_HDR_ALG_ES256;
69 extern const char *CJOSE_HDR_ALG_ES384;
70 extern const char *CJOSE_HDR_ALG_ES512;
71 
73 extern const char *CJOSE_HDR_ALG_DIR;
74 
76 extern const char *CJOSE_HDR_ENC_A256GCM;
77 
79 extern const char *CJOSE_HDR_ENC_A128CBC_HS256;
80 extern const char *CJOSE_HDR_ENC_A192CBC_HS384;
81 extern const char *CJOSE_HDR_ENC_A256CBC_HS512;
82 
86 typedef struct json_t cjose_header_t;
87 
97 
107 
116 
128 bool cjose_header_set(cjose_header_t *header, const char *attr, const char *value, cjose_err *err);
129 
144 const char *cjose_header_get(cjose_header_t *header, const char *attr, cjose_err *err);
145 
146 #ifdef __cplusplus
147 }
148 #endif
149 
150 #endif // CJOSE_HEADER_H
const char * CJOSE_HDR_ENC
cjose_header_t * cjose_header_new(cjose_err *err)
const char * CJOSE_HDR_ALG_RS256
const char * CJOSE_HDR_ALG
const char * CJOSE_HDR_ENC_A128CBC_HS256
const char * CJOSE_HDR_ALG_RSA1_5
const char * CJOSE_HDR_ALG_A128KW
Datatypes and functions for error reporting.
const char * CJOSE_HDR_ALG_PS256
const char * CJOSE_HDR_KID
const char * CJOSE_HDR_CTY
cjose_header_t * cjose_header_retain(cjose_header_t *header)
const char * CJOSE_HDR_ALG_ES256
struct json_t cjose_header_t
Definition: header.h:86
const char * CJOSE_HDR_ALG_RSA_OAEP
const char * CJOSE_HDR_ENC_A256GCM
Definition: error.h:65
const char * cjose_header_get(cjose_header_t *header, const char *attr, cjose_err *err)
const char * CJOSE_HDR_ALG_NONE
const char * CJOSE_HDR_ALG_HS256
const char * CJOSE_HDR_ALG_DIR
bool cjose_header_set(cjose_header_t *header, const char *attr, const char *value, cjose_err *err)
void cjose_header_release(cjose_header_t *header)