Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
hmac.c File Reference
HMAC (Keyed-Hashing for Message Authentication) More...
Go to the source code of this file.
Functions | |
error_t | hmacCompute (const HashAlgo *hash, const void *key, size_t keyLength, const void *data, size_t dataLength, uint8_t *digest) |
Compute HMAC using the specified hash function. | |
void | hmacInit (HmacContext *context, const HashAlgo *hash, const void *key, size_t keyLength) |
Initialize HMAC calculation. | |
void | hmacUpdate (HmacContext *context, const void *data, size_t length) |
Update the HMAC context with a portion of the message being hashed. | |
void | hmacFinal (HmacContext *context, uint8_t *digest) |
Finish the HMAC calculation. |
Detailed Description
HMAC (Keyed-Hashing for Message Authentication)
License
Copyright (C) 2010-2017 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.
Description
HMAC is a mechanism for message authentication using cryptographic hash functions. HMAC can be used with any iterative cryptographic hash function (MD5, SHA-1 or SHA-256) in combination with a secret shared key. Refer to RFC 2104 for more details
- Version:
- 1.7.6
Definition in file hmac.c.
Function Documentation
error_t hmacCompute | ( | const HashAlgo * | hash, |
const void * | key, | ||
size_t | keyLength, | ||
const void * | data, | ||
size_t | dataLength, | ||
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] keyLength Length of the key [in] data The input data for which to compute the hash code [in] dataLength Length of the input data [out] digest The computed HMAC value
- Returns:
- Error code
void hmacFinal | ( | HmacContext * | context, |
uint8_t * | digest | ||
) |
void hmacInit | ( | HmacContext * | context, |
const HashAlgo * | hash, | ||
const void * | key, | ||
size_t | keyLength | ||
) |
void hmacUpdate | ( | HmacContext * | context, |
const void * | data, | ||
size_t | length | ||
) |
Generated on Tue Jul 12 2022 17:10:20 by
