mbedtls_cipher_context_t Struct Reference

Generic cipher context. More...

`#include <cipher.h>`

Collaboration diagram for mbedtls_cipher_context_t:
[legend]

## Data Fields

const mbedtls_cipher_info_t * | cipher_info
| Information about the associated cipher. More...
int | key_bitlen
| Key length to use. More...
mbedtls_operation_t | operation
| Operation that the context's key has been initialised for. More...
void(* | add_padding )(unsigned char *output, size_t olen, size_t data_len)
| Padding functions to use, if relevant for cipher mode. More...
int(* | get_padding )(unsigned char *input, size_t ilen, size_t *data_len)
unsigned char | unprocessed_data [MBEDTLS_MAX_BLOCK_LENGTH]
| Buffer for data that hasn't been encrypted yet. More...
size_t | unprocessed_len
| Number of bytes that still need processing. More...
unsigned char | iv [MBEDTLS_MAX_IV_LENGTH]
| Current IV or NONCE_COUNTER for CTR-mode. More...
size_t | iv_size
| IV size in bytes (for ciphers with variable-length IVs) More...
void * | cipher_ctx
| Cipher-specific context. More...

## Detailed Description

Generic cipher context.

Definition at line 213 of file cipher.h.

## Field Documentation

void(* mbedtls_cipher_context_t::add_padding) (unsigned char *output, size_t olen, size_t data_len)

Padding functions to use, if relevant for cipher mode.

Definition at line 225 of file cipher.h.

void* mbedtls_cipher_context_t::cipher_ctx

Cipher-specific context.

Definition at line 242 of file cipher.h.

const mbedtls_cipher_info_t* mbedtls_cipher_context_t::cipher_info

Information about the associated cipher.

Definition at line 215 of file cipher.h.

Referenced by mbedtls_cipher_get_block_size(), mbedtls_cipher_get_cipher_mode(), mbedtls_cipher_get_iv_size(), mbedtls_cipher_get_key_bitlen(), mbedtls_cipher_get_name(), mbedtls_cipher_get_operation(), and mbedtls_cipher_get_type().

int(* mbedtls_cipher_context_t::get_padding) (unsigned char *input, size_t ilen, size_t *data_len)

Definition at line 226 of file cipher.h.

unsigned char mbedtls_cipher_context_t::iv[MBEDTLS_MAX_IV_LENGTH]

Current IV or NONCE_COUNTER for CTR-mode.

Definition at line 236 of file cipher.h.

size_t mbedtls_cipher_context_t::iv_size

IV size in bytes (for ciphers with variable-length IVs)

Definition at line 239 of file cipher.h.

Referenced by mbedtls_cipher_get_iv_size().

int mbedtls_cipher_context_t::key_bitlen

Key length to use.

Definition at line 218 of file cipher.h.

mbedtls_operation_t mbedtls_cipher_context_t::operation

Operation that the context's key has been initialised for.

Definition at line 221 of file cipher.h.

Referenced by mbedtls_cipher_get_operation().

unsigned char mbedtls_cipher_context_t::unprocessed_data[MBEDTLS_MAX_BLOCK_LENGTH]

Buffer for data that hasn't been encrypted yet.

Definition at line 230 of file cipher.h.

size_t mbedtls_cipher_context_t::unprocessed_len

Number of bytes that still need processing.

Definition at line 233 of file cipher.h.

The documentation for this struct was generated from the following file:

- cipher.h