#include "includes.h"
#include "common.h"
#include "crypto.h"
#include "sha1_i.h"
#include "md5_i.h"
Go to the source code of this file.
Classes | |
struct | crypto_hash |
Functions | |
void | crypto_global_deinit (void) |
int | crypto_global_init (void) |
int | crypto_hash_finish (struct crypto_hash *ctx, u8 *mac, size_t *len) |
struct crypto_hash * | crypto_hash_init (enum crypto_hash_alg alg, const u8 *key, size_t key_len) |
void | crypto_hash_update (struct crypto_hash *ctx, const u8 *data, size_t len) |
void crypto_global_deinit | ( | void | ) |
crypto_global_deinit - Deinitialize crypto wrapper
This function is only used with internal TLSv1 implementation (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need to implement this.
Definition at line 203 of file crypto_internal.c.
int crypto_global_init | ( | void | ) |
crypto_global_init - Initialize crypto wrapper
This function is only used with internal TLSv1 implementation (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need to implement this.
Definition at line 197 of file crypto_internal.c.
int crypto_hash_finish | ( | struct crypto_hash * | ctx, |
u8 * | hash, | ||
size_t * | len | ||
) |
crypto_hash_finish - Complete hash calculation : Context pointer from crypto_hash_init() : Buffer for hash value or NULL if caller is just freeing the hash context : Pointer to length of the buffer or NULL if caller is just freeing the hash context; on return, this is set to the actual length of the hash value Returns: 0 on success, -1 if buffer is too small (len set to needed length), or -2 on other failures (including failed crypto_hash_update() operations)
This function calculates the hash value and frees the context buffer that was used for hash calculation.
This function is only used with internal TLSv1 implementation (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need to implement this.
Definition at line 117 of file crypto_internal.c.
struct crypto_hash* crypto_hash_init | ( | enum crypto_hash_alg | alg, |
const u8 * | key, | ||
size_t | key_len | ||
) | [read] |
crypto_hash_init - Initialize hash/HMAC function : Hash algorithm : Key for keyed hash (e.g., HMAC) or NULL if not needed : Length of the key in bytes Returns: Pointer to hash context to use with other hash functions or NULL on failure
This function is only used with internal TLSv1 implementation (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need to implement this.
Definition at line 33 of file crypto_internal.c.
void crypto_hash_update | ( | struct crypto_hash * | ctx, |
const u8 * | data, | ||
size_t | len | ||
) |
crypto_hash_update - Add data to hash calculation : Context pointer from crypto_hash_init() : Data buffer to add : Length of the buffer
This function is only used with internal TLSv1 implementation (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need to implement this.
Definition at line 99 of file crypto_internal.c.