Files
nuttx/include/crypto/sha1.h
T
Alin Jerpelea 4a069358b6
Build Documentation / build-html (push) Has been cancelled
LICENSE: update NuttX-PublicDomain SPDX identifier
According to the feedback from SPDX community we should use
LicenseRef-NuttX-PublicDomain because NuttX-PublicDomain
is not a valid SPDX id, so it will fail tests for SPDX spec compliance.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2025-12-26 19:46:12 +08:00

39 lines
1.1 KiB
C

/****************************************************************************
* include/crypto/sha1.h
*
* SPDX-License-Identifier: LicenseRef-NuttX-PublicDomain
*
* By Steve Reid <steve@edmweb.com>
* 100% Public Domain
****************************************************************************/
#ifndef __INCLUDE_CRYPTO_SHA1_H
#define __INCLUDE_CRYPTO_SHA1_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <sys/types.h>
#define SHA1_BLOCK_LENGTH 64
#define SHA1_DIGEST_LENGTH 20
typedef struct
{
uint32_t state[5];
uint64_t count;
unsigned char buffer[SHA1_BLOCK_LENGTH];
} SHA1_CTX;
void sha1init(FAR SHA1_CTX * context);
void sha1transform(FAR uint32_t *state,
FAR const unsigned char *buffer);
void sha1update(FAR SHA1_CTX *context,
FAR const void *data,
unsigned int len);
void sha1final(FAR unsigned char *digest,
FAR SHA1_CTX *context);
#endif /* __INCLUDE_CRYPTO_SHA1_H */