#include <crypto.h>
Data Fields | |
| const char * | name |
| Algorithm name. | |
| size_t | ctxsize |
| Context size. | |
| size_t | blocksize |
| Block size. | |
| int(* | setkey )(void *ctx, const void *key, size_t keylen) |
| Set key. | |
| void(* | setiv )(void *ctx, const void *iv) |
| Set initialisation vector. | |
| void(* | encrypt )(void *ctx, const void *src, void *dst, size_t len) |
| Encrypt data. | |
| void(* | decrypt )(void *ctx, const void *src, void *dst, size_t len) |
| Decrypt data. | |
Definition at line 48 of file crypto.h.
| const char* cipher_algorithm::name |
Context size.
Definition at line 52 of file crypto.h.
Referenced by tls_send_plaintext(), and tls_set_cipher().
Block size.
Definition at line 54 of file crypto.h.
Referenced by cbc_decrypt(), cbc_encrypt(), cbc_setiv(), is_stream_cipher(), tls_assemble_block(), tls_generate_keys(), and tls_split_block().
| int( * cipher_algorithm::setkey)(void *ctx, const void *key, size_t keylen) |
Set key.
| ctx | Context | |
| key | Key | |
| keylen | Key length |
| rc | Return status code |
Referenced by cipher_setkey().
| void( * cipher_algorithm::setiv)(void *ctx, const void *iv) |
Set initialisation vector.
| ctx | Context | |
| iv | Initialisation vector |
Referenced by cipher_setiv().
| void( * cipher_algorithm::encrypt)(void *ctx, const void *src, void *dst, size_t len) |
Encrypt data.
| ctx | Context | |
| src | Data to encrypt | |
| dst | Buffer for encrypted data | |
| len | Length of data | |
| len | is guaranteed to be a multiple of blocksize. |
Referenced by cipher_encrypt().
| void( * cipher_algorithm::decrypt)(void *ctx, const void *src, void *dst, size_t len) |
Decrypt data.
| ctx | Context | |
| src | Data to decrypt | |
| dst | Buffer for decrypted data | |
| len | Length of data | |
| len | is guaranteed to be a multiple of blocksize. |
Referenced by cipher_decrypt().
1.5.7.1