CJOSE 0.6.1
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
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
25extern "C" {
26#endif
27
31typedef struct _cjose_jws_int cjose_jws_t;
32
46 const cjose_jwk_t *jwk, cjose_header_t *protected_header, const uint8_t *plaintext, size_t plaintext_len, cjose_err *err);
47
63bool cjose_jws_export(cjose_jws_t *jws, const char **ser, cjose_err *err);
64
77cjose_jws_t *cjose_jws_import(const char *compact, size_t compact_len, cjose_err *err);
78
89
104bool cjose_jws_get_plaintext(const cjose_jws_t *jws, uint8_t **plaintext, size_t *plaintext_len, cjose_err *err);
105
117
124
125#ifdef __cplusplus
126}
127#endif
128
129#endif // CJOSE_JWS_H
Functions and data structures for interacting with JSON Web Signature (JWS) objects.
struct json_t cjose_header_t
Definition: header.h:96
Functions and data structures for interacting with JSON Web Key (JWK) objects.
struct _cjose_jwk_int cjose_jwk_t
Definition: jwk.h:49
cjose_header_t * cjose_jws_get_protected(cjose_jws_t *jws)
bool cjose_jws_get_plaintext(const cjose_jws_t *jws, uint8_t **plaintext, size_t *plaintext_len, cjose_err *err)
void cjose_jws_release(cjose_jws_t *jws)
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_t * cjose_jws_import(const char *compact, size_t compact_len, cjose_err *err)
bool cjose_jws_export(cjose_jws_t *jws, const char **ser, cjose_err *err)
bool cjose_jws_verify(cjose_jws_t *jws, const cjose_jwk_t *jwk, cjose_err *err)
struct _cjose_jws_int cjose_jws_t
Definition: jws.h:31
Definition: error.h:66