|
wpa_supplicant / hostapd
2.5
|
Crypto wrapper for internal crypto implementation. More...
#include "includes.h"#include "common.h"#include "crypto.h"#include "sha256_i.h"#include "sha1_i.h"#include "md5_i.h"Data Structures | |
| struct | crypto_hash |
Functions | |
| struct crypto_hash * | crypto_hash_init (enum crypto_hash_alg alg, const u8 *key, size_t key_len) |
| Initialize hash/HMAC function. More... | |
| void | crypto_hash_update (struct crypto_hash *ctx, const u8 *data, size_t len) |
| Add data to hash calculation. More... | |
| int | crypto_hash_finish (struct crypto_hash *ctx, u8 *mac, size_t *len) |
| Complete hash calculation. More... | |
| int | crypto_global_init (void) |
| Initialize crypto wrapper. More... | |
| void | crypto_global_deinit (void) |
| Deinitialize crypto wrapper. More... | |
Crypto wrapper for internal crypto implementation.
| void crypto_global_deinit | ( | void | ) |
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.
| int crypto_global_init | ( | void | ) |
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.
| int crypto_hash_finish | ( | struct crypto_hash * | ctx, |
| u8 * | hash, | ||
| size_t * | len | ||
| ) |
Complete hash calculation.
| ctx | Context pointer from crypto_hash_init() |
| hash | Buffer for hash value or NULL if caller is just freeing the hash context |
| len | 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 |
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.
| struct crypto_hash* crypto_hash_init | ( | enum crypto_hash_alg | alg, |
| const u8 * | key, | ||
| size_t | key_len | ||
| ) |
Initialize hash/HMAC function.
| alg | Hash algorithm |
| key | Key for keyed hash (e.g., HMAC) or NULL if not needed |
| key_len | Length of the key in bytes |
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.
| void crypto_hash_update | ( | struct crypto_hash * | ctx, |
| const u8 * | data, | ||
| size_t | len | ||
| ) |
Add data to hash calculation.
| ctx | Context pointer from crypto_hash_init() |
| data | Data buffer to add |
| len | 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.
1.8.6