ParallelHash hash function. More...
Go to the source code of this file.
Data Structures | |
| struct | ParallelHashContext |
| ParallelHash algorithm context. More... | |
Macros | |
| #define | PARALLEL_HASH_CONTEXT_PRIVATE |
Functions | |
| error_t | parallelHashCompute (uint_t strength, size_t blockSize, const void *data, size_t dataLen, const char_t *custom, size_t customLen, uint8_t *digest, size_t digestLen) |
| Digest a message using ParallelHash. More... | |
| error_t | parallelHashInit (ParallelHashContext *context, uint_t strength, size_t blockSize, const char_t *custom, size_t customLen) |
| Initialize ParallelHash message digest context. More... | |
| void | parallelHashUpdate (ParallelHashContext *context, const void *data, size_t length) |
| Update the ParallelHash context with a portion of the message being hashed. More... | |
| void | parallelHashFinal (ParallelHashContext *context, uint8_t *digest, size_t length) |
| Finish the ParallelHash message digest. More... | |
Detailed Description
ParallelHash 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 parallel_hash.h.
Macro Definition Documentation
◆ PARALLEL_HASH_CONTEXT_PRIVATE
| #define PARALLEL_HASH_CONTEXT_PRIVATE |
Definition at line 40 of file parallel_hash.h.
Function Documentation
◆ parallelHashCompute()
| error_t parallelHashCompute | ( | uint_t | strength, |
| size_t | blockSize, | ||
| const void * | data, | ||
| size_t | dataLen, | ||
| const char_t * | custom, | ||
| size_t | customLen, | ||
| uint8_t * | digest, | ||
| size_t | digestLen | ||
| ) |
Digest a message using ParallelHash.
- Parameters
-
[in] strength Number of bits of security (128 for ParallelHash128 and 256 for ParallelHash256) [in] blockSize Block size in bytes for parallel hashing (B) [in] data Pointer to the input string (X) [in] dataLen Length of the input string [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 62 of file parallel_hash.c.
◆ parallelHashFinal()
| void parallelHashFinal | ( | ParallelHashContext * | context, |
| uint8_t * | digest, | ||
| size_t | length | ||
| ) |
Finish the ParallelHash message digest.
- Parameters
-
[in] context Pointer to the ParallelHash context [out] digest Calculated digest [in] length Expected length of the digest (L)
Definition at line 225 of file parallel_hash.c.
◆ parallelHashInit()
| error_t parallelHashInit | ( | ParallelHashContext * | context, |
| uint_t | strength, | ||
| size_t | blockSize, | ||
| const char_t * | custom, | ||
| size_t | customLen | ||
| ) |
Initialize ParallelHash message digest context.
- Parameters
-
[in] context Pointer to the ParallelHash context to initialize [in] strength Number of bits of security (128 for ParallelHash128 and 256 for ParallelHash256) [in] blockSize Block size in bytes for parallel hashing (B) [in] custom Customization string (S) [in] customLen Length of the customization string
- Returns
- Error code
Definition at line 121 of file parallel_hash.c.
◆ parallelHashUpdate()
| void parallelHashUpdate | ( | ParallelHashContext * | context, |
| const void * | data, | ||
| size_t | length | ||
| ) |
Update the ParallelHash context with a portion of the message being hashed.
- Parameters
-
[in] context Pointer to the ParallelHash context [in] data Pointer to the input string [in] length Length of the string
Definition at line 176 of file parallel_hash.c.
