TupleHash hash function. More...
Go to the source code of this file.
Data Structures | |
| struct | TupleHashContext |
| TupleHash algorithm context. More... | |
Macros | |
| #define | TUPLE_HASH_CONTEXT_PRIVATE |
Functions | |
| error_t | tupleHashCompute (uint_t strength, const DataFrag *dataFrags, uint_t dataNumFrags, const char_t *custom, size_t customLen, uint8_t *digest, size_t digestLen) |
| Digest a message using TupleHash. More... | |
| error_t | tupleHashInit (TupleHashContext *context, uint_t strength, const char_t *custom, size_t customLen) |
| Initialize TupleHash message digest context. More... | |
| void | tupleHashUpdate (TupleHashContext *context, const void *data, size_t length) |
| Update the TupleHash context with a portion of the message being hashed. More... | |
| void | tupleHashFinal (TupleHashContext *context, uint8_t *digest, size_t length) |
| Finish the TupleHash message digest. More... | |
Detailed Description
TupleHash hash function.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2026 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.6.6
Definition in file tuple_hash.h.
Macro Definition Documentation
◆ TUPLE_HASH_CONTEXT_PRIVATE
| #define TUPLE_HASH_CONTEXT_PRIVATE |
Definition at line 40 of file tuple_hash.h.
Function Documentation
◆ tupleHashCompute()
| error_t tupleHashCompute | ( | uint_t | strength, |
| const DataFrag * | dataFrags, | ||
| uint_t | dataNumFrags, | ||
| const char_t * | custom, | ||
| size_t | customLen, | ||
| uint8_t * | digest, | ||
| size_t | digestLen | ||
| ) |
Digest a message using TupleHash.
- Parameters
-
[in] strength Number of bits of security (128 for TupleHash128 and 256 for TupleHash256) [in] dataFrags Tuple of input strings (X) [in] dataNumFrags Number of input strings in the tuple (n) [in] custom Customization string (S) [in] customLen Length of the customization string [out] digest Calculated digest [in] digestLen Expected length of the digest (L)
- Returns
- Error code
Definition at line 60 of file tuple_hash.c.
◆ tupleHashFinal()
| void tupleHashFinal | ( | TupleHashContext * | context, |
| uint8_t * | digest, | ||
| size_t | length | ||
| ) |
Finish the TupleHash message digest.
- Parameters
-
[in] context Pointer to the TupleHash context [out] digest Calculated digest [in] length Expected length of the digest (L)
Definition at line 162 of file tuple_hash.c.
◆ tupleHashInit()
| error_t tupleHashInit | ( | TupleHashContext * | context, |
| uint_t | strength, | ||
| const char_t * | custom, | ||
| size_t | customLen | ||
| ) |
Initialize TupleHash message digest context.
- Parameters
-
[in] context Pointer to the TupleHash context to initialize [in] strength Number of bits of security (128 for TupleHash128 and 256 for TupleHash256) [in] custom Customization string (S) [in] customLen Length of the customization string
- Returns
- Error code
Definition at line 123 of file tuple_hash.c.
◆ tupleHashUpdate()
| void tupleHashUpdate | ( | TupleHashContext * | context, |
| const void * | data, | ||
| size_t | length | ||
| ) |
Update the TupleHash context with a portion of the message being hashed.
- Parameters
-
[in] context Pointer to the TupleHash context [in] data Pointer to the input string [in] length Length of the string
Definition at line 143 of file tuple_hash.c.
