CJOSE  0.5.1
jwe.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 
15 #ifndef CJOSE_JWE_H
16 #define CJOSE_JWE_H
17 
18 #include <stdbool.h>
19 #include <stdint.h>
20 #include <stddef.h>
21 #include "header.h"
22 #include "error.h"
23 #include "jwk.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
32 typedef struct _cjose_jwe_int cjose_jwe_t;
33 
53  const cjose_jwk_t *jwk, cjose_header_t *protected_header, const uint8_t *plaintext, size_t plaintext_len, cjose_err *err);
54 
69 char *cjose_jwe_export(cjose_jwe_t *jwe, cjose_err *err);
70 
83 cjose_jwe_t *cjose_jwe_import(const char *compact, size_t compact_len, cjose_err *err);
84 
98 uint8_t *cjose_jwe_decrypt(cjose_jwe_t *jwe, const cjose_jwk_t *jwk, size_t *content_len, cjose_err *err);
99 
111 
117 void cjose_jwe_release(cjose_jwe_t *jwe);
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif // CJOSE_JWE_H
uint8_t * cjose_jwe_decrypt(cjose_jwe_t *jwe, const cjose_jwk_t *jwk, size_t *content_len, cjose_err *err)
Functions and data structures for interacting with JSON Web Signature (JWS) objects.
Functions and data structures for interacting with JSON Web Key (JWK) objects.
cjose_header_t * cjose_jwe_get_protected(cjose_jwe_t *jwe)
cjose_jwe_t * cjose_jwe_import(const char *compact, size_t compact_len, cjose_err *err)
struct _cjose_jwk_int cjose_jwk_t
Definition: jwk.h:48
Datatypes and functions for error reporting.
struct _cjose_jwe_int cjose_jwe_t
Definition: jwe.h:32
struct json_t cjose_header_t
Definition: header.h:86
Definition: error.h:65
void cjose_jwe_release(cjose_jwe_t *jwe)
cjose_jwe_t * cjose_jwe_encrypt(const cjose_jwk_t *jwk, cjose_header_t *protected_header, const uint8_t *plaintext, size_t plaintext_len, cjose_err *err)
char * cjose_jwe_export(cjose_jwe_t *jwe, cjose_err *err)