cipher_context_t Struct Reference

Generic cipher context. More...

#include <cipher.h>

Collaboration diagram for cipher_context_t:
Collaboration graph
[legend]

Data Fields

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

Detailed Description

Generic cipher context.

Definition at line 239 of file cipher.h.


Field Documentation

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

Padding functions to use, if relevant for cipher mode.

Referenced by cipher_finish().

Cipher-specific context.

Definition at line 266 of file cipher.h.

Referenced by cipher_finish(), cipher_free_ctx(), cipher_init_ctx(), cipher_setkey(), and cipher_update().

int(* cipher_context_t::get_padding)(unsigned char *input, size_t ilen, size_t *data_len)
unsigned char cipher_context_t::iv[POLARSSL_MAX_IV_LENGTH]

Current IV or NONCE_COUNTER for CTR-mode.

Definition at line 260 of file cipher.h.

Referenced by cipher_finish(), cipher_set_iv(), cipher_update(), ssl_decrypt_buf(), and ssl_encrypt_buf().

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

Definition at line 263 of file cipher.h.

Referenced by cipher_get_iv_size(), and cipher_set_iv().

Key length to use.

Definition at line 244 of file cipher.h.

Referenced by cipher_setkey().

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

Definition at line 247 of file cipher.h.

Referenced by cipher_finish(), cipher_get_operation(), cipher_setkey(), and cipher_update().

unsigned char cipher_context_t::unprocessed_data[POLARSSL_MAX_BLOCK_LENGTH]

Buffer for data that hasn't been encrypted yet.

Definition at line 254 of file cipher.h.

Referenced by cipher_finish(), and cipher_update().

Number of bytes that still need processing.

Definition at line 257 of file cipher.h.

Referenced by cipher_finish(), cipher_reset(), and cipher_update().


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

Generated on 9 Apr 2014 for PolarSSL v1.3.2 by  doxygen 1.6.1