CJOSE
0.6.2.2
Toggle main menu visibility
Loading...
Searching...
No Matches
include
cjose
jws.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
14
15
#ifndef CJOSE_JWS_H
16
#define CJOSE_JWS_H
17
18
#include <stdbool.h>
19
#include <stdint.h>
20
#include <stddef.h>
21
#include "
header.h
"
22
#include "
jwk.h
"
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
31
typedef
struct
_cjose_jws_int
cjose_jws_t
;
32
45
cjose_jws_t
*
cjose_jws_sign
(
46
const
cjose_jwk_t
*jwk,
cjose_header_t
*protected_header,
const
uint8_t *plaintext,
size_t
plaintext_len,
cjose_err
*err);
47
63
bool
cjose_jws_export
(
cjose_jws_t
*jws,
const
char
**ser,
cjose_err
*err);
64
77
cjose_jws_t
*
cjose_jws_import
(
const
char
*compact,
size_t
compact_len,
cjose_err
*err);
78
88
bool
cjose_jws_verify
(
cjose_jws_t
*jws,
const
cjose_jwk_t
*jwk,
cjose_err
*err);
89
104
bool
cjose_jws_get_plaintext
(
const
cjose_jws_t
*jws, uint8_t **plaintext,
size_t
*plaintext_len,
cjose_err
*err);
105
116
cjose_header_t
*
cjose_jws_get_protected
(
cjose_jws_t
*jws);
117
123
void
cjose_jws_release
(
cjose_jws_t
*jws);
124
125
#ifdef __cplusplus
126
}
127
#endif
128
129
#endif
// CJOSE_JWS_H
header.h
Functions and data structures for interacting with JSON Web Signature (JWS) objects.
cjose_header_t
struct json_t cjose_header_t
Definition
header.h:98
jwk.h
Functions and data structures for interacting with JSON Web Key (JWK) objects.
cjose_jwk_t
struct _cjose_jwk_int cjose_jwk_t
Definition
jwk.h:50
cjose_jws_get_protected
cjose_header_t * cjose_jws_get_protected(cjose_jws_t *jws)
cjose_jws_get_plaintext
bool cjose_jws_get_plaintext(const cjose_jws_t *jws, uint8_t **plaintext, size_t *plaintext_len, cjose_err *err)
cjose_jws_release
void cjose_jws_release(cjose_jws_t *jws)
cjose_jws_sign
cjose_jws_t * cjose_jws_sign(const cjose_jwk_t *jwk, cjose_header_t *protected_header, const uint8_t *plaintext, size_t plaintext_len, cjose_err *err)
cjose_jws_import
cjose_jws_t * cjose_jws_import(const char *compact, size_t compact_len, cjose_err *err)
cjose_jws_export
bool cjose_jws_export(cjose_jws_t *jws, const char **ser, cjose_err *err)
cjose_jws_verify
bool cjose_jws_verify(cjose_jws_t *jws, const cjose_jwk_t *jwk, cjose_err *err)
cjose_jws_t
struct _cjose_jws_int cjose_jws_t
Definition
jws.h:31
cjose_err
Definition
error.h:67
Generated on
for CJOSE by
1.17.0