nrfxlib API
3.4.99
Toggle main menu visibility
Loading...
Searching...
No Matches
cc3xx_asn1_util.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2021-2022, Arm Limited. All rights reserved.
3
*
4
* SPDX-License-Identifier: BSD-3-Clause
5
*
6
*/
7
14
15
#ifndef CC3XX_INTERNAL_ASN1_UTIL_H
16
#define CC3XX_INTERNAL_ASN1_UTIL_H
17
18
#include <psa/crypto.h>
19
#include <stdint.h>
20
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
36
#define CC3XX_TAG_ASN1_INTEGER 0x02
37
#define CC3XX_TAG_ASN1_SEQUENCE 0x10
38
#define CC3XX_TAG_ASN1_CONSTRUCTED 0x20
39
53
int
cc3xx_asn1_write_len
(
unsigned
char
**p,
const
unsigned
char
*start,
size_t
len);
54
67
int
cc3xx_asn1_write_tag
(
unsigned
char
**p,
const
unsigned
char
*start,
68
unsigned
char
tag);
69
84
int
cc3xx_asn1_write_big_integer
(
unsigned
char
**p,
const
unsigned
char
*start,
85
uint8_t *data,
size_t
data_size);
86
101
int
cc3xx_asn1_write_int
(
unsigned
char
**p,
unsigned
char
*start,
int
val);
102
121
psa_status_t
cc3xx_asn1_get_tag
(
unsigned
char
**p,
const
unsigned
char
*end,
size_t
*len,
122
int
tag);
123
141
psa_status_t
cc3xx_asn1_get_len
(
unsigned
char
**p,
const
unsigned
char
*end,
142
size_t
*len);
143
159
psa_status_t
cc3xx_asn1_get_int
(
unsigned
char
**p,
const
unsigned
char
*end,
int
*val);
160
161
#ifdef __cplusplus
162
}
163
#endif
164
#endif
/* CC3XX_INTERNAL_ASN1_UTIL_H */
cc3xx_asn1_write_int
int cc3xx_asn1_write_int(unsigned char **p, unsigned char *start, int val)
Write an int tag and value in ASN.1 format.
cc3xx_asn1_write_tag
int cc3xx_asn1_write_tag(unsigned char **p, const unsigned char *start, unsigned char tag)
Write an ASN.1 tag in ASN.1 format.
cc3xx_asn1_get_tag
psa_status_t cc3xx_asn1_get_tag(unsigned char **p, const unsigned char *end, size_t *len, int tag)
Get the tag and length of the element. Check for the requested tag. Updates the pointer to immediatel...
cc3xx_asn1_get_len
psa_status_t cc3xx_asn1_get_len(unsigned char **p, const unsigned char *end, size_t *len)
Get the length of an ASN.1 element. Updates the pointer to immediately behind the length.
cc3xx_asn1_write_big_integer
int cc3xx_asn1_write_big_integer(unsigned char **p, const unsigned char *start, uint8_t *data, size_t data_size)
Write an int tag and value in ASN.1 format represented as a uint8_t array.
cc3xx_asn1_write_len
int cc3xx_asn1_write_len(unsigned char **p, const unsigned char *start, size_t len)
Write a length field in ASN.1 format.
cc3xx_asn1_get_int
psa_status_t cc3xx_asn1_get_int(unsigned char **p, const unsigned char *end, int *val)
Retrieve an integer ASN.1 tag and its value. Updates the pointer to immediately behind the full tag.
crypto
nrf_cc310_mbedcrypto
include
cc3xx_asn1_util.h
Generated on
for nrfxlib API by
1.17.0