Webserver+3d print

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

hmac.h File Reference

hmac.h File Reference

HMAC (Keyed-Hashing for Message Authentication) More...

Go to the source code of this file.

Data Structures

struct  HmacContext
 HMAC algorithm context. More...

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 length)
 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.

Author:
Oryx Embedded SARL (www.oryx-embedded.com)
Version:
1.7.6

Definition in file hmac.h.


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]hashHash algorithm used to compute HMAC
[in]keyKey to use in the hash algorithm
[in]keyLengthLength of the key
[in]dataThe input data for which to compute the hash code
[in]dataLengthLength of the input data
[out]digestThe computed HMAC value
Returns:
Error code

Definition at line 84 of file hmac.c.

void hmacFinal ( HmacContext context,
uint8_t *  digest 
)

Finish the HMAC calculation.

Parameters:
[in]contextPointer to the HMAC context
[out]digestCalculated HMAC value (optional parameter)

Definition at line 176 of file hmac.c.

void hmacInit ( HmacContext context,
const HashAlgo hash,
const void *  key,
size_t  keyLength 
)

Initialize HMAC calculation.

Parameters:
[in]contextPointer to the HMAC context to initialize
[in]hashHash algorithm used to compute HMAC
[in]keyKey to use in the hash algorithm
[in]keyLengthLength of the key

Definition at line 115 of file hmac.c.

void hmacUpdate ( HmacContext context,
const void *  data,
size_t  length 
)

Update the HMAC context with a portion of the message being hashed.

Parameters:
[in]contextPointer to the HMAC context
[in]dataPointer to the buffer being hashed
[in]lengthLength of the buffer

Definition at line 161 of file hmac.c.