HMAC (Keyed-Hashing for Message Authentication) More...
Go to the source code of this file.
Data Structures | |
| struct | HmacContext |
| HMAC algorithm context. More... | |
Macros | |
| #define | HMAC_PRIVATE_CONTEXT |
| #define | HMAC_IPAD 0x36 |
| #define | HMAC_OPAD 0x5C |
Functions | |
| error_t | hmacCompute (const HashAlgo *hash, const void *key, size_t keyLen, const void *data, size_t dataLen, uint8_t *digest) |
| Compute HMAC using the specified hash function. More... | |
| error_t | hmacInit (HmacContext *context, const HashAlgo *hash, const void *key, size_t keyLen) |
| Initialize HMAC calculation. More... | |
| void | hmacUpdate (HmacContext *context, const void *data, size_t length) |
| Update the HMAC context with a portion of the message being hashed. More... | |
| void | hmacFinal (HmacContext *context, uint8_t *digest) |
| Finish the HMAC calculation. More... | |
| void | hmacFinalRaw (HmacContext *context, uint8_t *digest) |
| Finish the HMAC calculation (no padding added) More... | |
| void | hmacDeinit (HmacContext *context) |
| Release HMAC context. More... | |
Variables | |
| const uint8_t | HMAC_WITH_MD5_OID [8] |
| const uint8_t | HMAC_WITH_TIGER_OID [8] |
| const uint8_t | HMAC_WITH_RIPEMD160_OID [8] |
| const uint8_t | HMAC_WITH_SHA1_OID [8] |
| const uint8_t | HMAC_WITH_SHA224_OID [8] |
| const uint8_t | HMAC_WITH_SHA256_OID [8] |
| const uint8_t | HMAC_WITH_SHA384_OID [8] |
| const uint8_t | HMAC_WITH_SHA512_OID [8] |
| const uint8_t | HMAC_WITH_SHA512_224_OID [8] |
| const uint8_t | HMAC_WITH_SHA512_256_OID [8] |
| const uint8_t | HMAC_WITH_SHA3_224_OID [9] |
| const uint8_t | HMAC_WITH_SHA3_256_OID [9] |
| const uint8_t | HMAC_WITH_SHA3_384_OID [9] |
| const uint8_t | HMAC_WITH_SHA3_512_OID [9] |
| const uint8_t | HMAC_WITH_SM3_OID [10] |
Detailed Description
HMAC (Keyed-Hashing for Message Authentication)
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneCRYPTO Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.5.4
Definition in file hmac.h.
Macro Definition Documentation
◆ HMAC_IPAD
◆ HMAC_OPAD
◆ HMAC_PRIVATE_CONTEXT
Function Documentation
◆ hmacCompute()
| error_t hmacCompute | ( | const HashAlgo * | hash, |
| const void * | key, | ||
| size_t | keyLen, | ||
| const void * | data, | ||
| size_t | dataLen, | ||
| uint8_t * | digest | ||
| ) |
Compute HMAC using the specified hash function.
- Parameters
-
[in] hash Hash algorithm used to compute HMAC [in] key Key to use in the hash algorithm [in] keyLen Length of the key [in] data The input data for which to compute the hash code [in] dataLen Length of the input data [out] digest The computed HMAC value
- Returns
- Error code
◆ hmacDeinit()
| void hmacDeinit | ( | HmacContext * | context | ) |
◆ hmacFinal()
| void hmacFinal | ( | HmacContext * | context, |
| uint8_t * | digest | ||
| ) |
◆ hmacFinalRaw()
| void hmacFinalRaw | ( | HmacContext * | context, |
| uint8_t * | digest | ||
| ) |
◆ hmacInit()
| error_t hmacInit | ( | HmacContext * | context, |
| const HashAlgo * | hash, | ||
| const void * | key, | ||
| size_t | keyLen | ||
| ) |
◆ hmacUpdate()
| void hmacUpdate | ( | HmacContext * | context, |
| const void * | data, | ||
| size_t | length | ||
| ) |
