CycloneBOOT 2.6.6
Secure Bootloader for ARM Cortex-M MCU
Loading...
Searching...
No Matches
crc32.h File Reference

CycloneBOOT CRC32 cryptographic integrity tag. More...

#include "core/crypto.h"

Go to the source code of this file.

Classes

struct  Crc32Context
 CRC32 algorithm context. More...
 

Macros

#define CRC32_BLOCK_SIZE   64
 
#define CRC32_DIGEST_SIZE   4
 
#define CRC32_MIN_PAD_SIZE   9
 
#define CRC32_OID   crc32Oid
 
#define CRC32_HASH_ALGO   (&crc32HashAlgo)
 

Functions

error_t crc32Compute (const void *data, size_t length, uint8_t *digest)
 Digest a message using CRC32.
 
void crc32Init (Crc32Context *context)
 Initialize CRC32 message digest context.
 
void crc32Update (Crc32Context *context, const void *data, size_t length)
 Update the CRC32 context with a portion of the message being hashed.
 
void crc32Final (Crc32Context *context, uint8_t *digest)
 Finish the CRC32 message digest.
 
void crc32FinalRaw (Crc32Context *context, uint8_t *digest)
 
void crc32ProcessBlock (Crc32Context *context)
 

Variables

const HashAlgo crc32HashAlgo
 

Detailed Description

CycloneBOOT CRC32 cryptographic integrity tag.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2021-2026 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneBOOT 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
2.6.6

Function Documentation

◆ crc32Compute()

error_t crc32Compute ( const void *  data,
size_t  length,
uint8_t *  digest 
)

Digest a message using CRC32.

Parameters
[in]dataPointer to the message being hashed
[in]lengthLength of the message
[out]digestPointer to the calculated digest
Returns
Error code

◆ crc32Final()

void crc32Final ( Crc32Context *  context,
uint8_t *  digest 
)

Finish the CRC32 message digest.

Parameters
[in]contextPointer to the CRC32 context
[out]digestCalculated digest (optional parameter)

◆ crc32Init()

void crc32Init ( Crc32Context *  context)

Initialize CRC32 message digest context.

Parameters
[in]contextPointer to the CRC32 context to initialize

◆ crc32Update()

void crc32Update ( Crc32Context *  context,
const void *  data,
size_t  length 
)

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

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