apm32f4xx_crypto_hash.h File Reference

APM32F4 hash hardware accelerator. More...

#include "core/crypto.h"

Go to the source code of this file.

Macros

#define APM32F4XX_CRYPTO_HASH_SUPPORT   DISABLED
 
#define HASH_CTRL_LKEYSEL   0x00010000
 
#define HASH_CTRL_DINNEMPT   0x00001000
 
#define HASH_CTRL_WNUM   0x00000F00
 
#define HASH_CTRL_ALGSEL   0x00000080
 
#define HASH_CTRL_ALGSEL_SHA1   0x00000000
 
#define HASH_CTRL_ALGSEL_MD5   0x00000080
 
#define HASH_CTRL_MODESEL   0x00000040
 
#define HASH_CTRL_DTYPE   0x00000030
 
#define HASH_CTRL_DTYPE_32B   0x00000000
 
#define HASH_CTRL_DTYPE_16B   0x00000010
 
#define HASH_CTRL_DTYPE_8B   0x00000020
 
#define HASH_CTRL_DTYPE_1B   0x00000030
 
#define HASH_CTRL_DMAEN   0x00000008
 
#define HASH_CTRL_INITCAL   0x00000004
 
#define HASH_STS_BUSY   0x00000008
 
#define HASH_STS_DMA   0x00000004
 
#define HASH_STS_DCALCINT   0x00000002
 
#define HASH_STS_INDATAINT   0x00000001
 

Functions

error_t hashInit (void)
 HASH module initialization. More...
 

Detailed Description

APM32F4 hash hardware accelerator.

License

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

Copyright (C) 2010-2024 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
2.4.4

Definition in file apm32f4xx_crypto_hash.h.

Macro Definition Documentation

◆ APM32F4XX_CRYPTO_HASH_SUPPORT

#define APM32F4XX_CRYPTO_HASH_SUPPORT   DISABLED

Definition at line 39 of file apm32f4xx_crypto_hash.h.

◆ HASH_CTRL_ALGSEL

#define HASH_CTRL_ALGSEL   0x00000080

Definition at line 48 of file apm32f4xx_crypto_hash.h.

◆ HASH_CTRL_ALGSEL_MD5

#define HASH_CTRL_ALGSEL_MD5   0x00000080

Definition at line 50 of file apm32f4xx_crypto_hash.h.

◆ HASH_CTRL_ALGSEL_SHA1

#define HASH_CTRL_ALGSEL_SHA1   0x00000000

Definition at line 49 of file apm32f4xx_crypto_hash.h.

◆ HASH_CTRL_DINNEMPT

#define HASH_CTRL_DINNEMPT   0x00001000

Definition at line 46 of file apm32f4xx_crypto_hash.h.

◆ HASH_CTRL_DMAEN

#define HASH_CTRL_DMAEN   0x00000008

Definition at line 57 of file apm32f4xx_crypto_hash.h.

◆ HASH_CTRL_DTYPE

#define HASH_CTRL_DTYPE   0x00000030

Definition at line 52 of file apm32f4xx_crypto_hash.h.

◆ HASH_CTRL_DTYPE_16B

#define HASH_CTRL_DTYPE_16B   0x00000010

Definition at line 54 of file apm32f4xx_crypto_hash.h.

◆ HASH_CTRL_DTYPE_1B

#define HASH_CTRL_DTYPE_1B   0x00000030

Definition at line 56 of file apm32f4xx_crypto_hash.h.

◆ HASH_CTRL_DTYPE_32B

#define HASH_CTRL_DTYPE_32B   0x00000000

Definition at line 53 of file apm32f4xx_crypto_hash.h.

◆ HASH_CTRL_DTYPE_8B

#define HASH_CTRL_DTYPE_8B   0x00000020

Definition at line 55 of file apm32f4xx_crypto_hash.h.

◆ HASH_CTRL_INITCAL

#define HASH_CTRL_INITCAL   0x00000004

Definition at line 58 of file apm32f4xx_crypto_hash.h.

◆ HASH_CTRL_LKEYSEL

#define HASH_CTRL_LKEYSEL   0x00010000

Definition at line 45 of file apm32f4xx_crypto_hash.h.

◆ HASH_CTRL_MODESEL

#define HASH_CTRL_MODESEL   0x00000040

Definition at line 51 of file apm32f4xx_crypto_hash.h.

◆ HASH_CTRL_WNUM

#define HASH_CTRL_WNUM   0x00000F00

Definition at line 47 of file apm32f4xx_crypto_hash.h.

◆ HASH_STS_BUSY

#define HASH_STS_BUSY   0x00000008

Definition at line 61 of file apm32f4xx_crypto_hash.h.

◆ HASH_STS_DCALCINT

#define HASH_STS_DCALCINT   0x00000002

Definition at line 63 of file apm32f4xx_crypto_hash.h.

◆ HASH_STS_DMA

#define HASH_STS_DMA   0x00000004

Definition at line 62 of file apm32f4xx_crypto_hash.h.

◆ HASH_STS_INDATAINT

#define HASH_STS_INDATAINT   0x00000001

Definition at line 64 of file apm32f4xx_crypto_hash.h.

Function Documentation

◆ hashInit()

error_t hashInit ( void  )

HASH module initialization.

Returns
Error code

Definition at line 52 of file apm32f4xx_crypto_hash.c.