mirror of
https://github.com/linux-msm/qdl.git
synced 2026-02-25 13:12:25 -08:00
Add SPDX-License-Identifier line to each source file that contains license text. More details about SPDX license identifiers can be found at [1]. The scancode-toolkit [2] was used to match license text to the correct SPDX-License-Identifier: $ scancode --license --copyright --html scancode_result.html ./ [1] https://spdx.org/licenses/ [2] https://github.com/nexB/scancode-toolkit Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
/* SPDX-License-Identifier: BSD-3-Clause */
|
|
/* $OpenBSD: sha2.h,v 1.10 2016/09/03 17:00:29 tedu Exp $ */
|
|
|
|
/*
|
|
* FILE: sha2.h
|
|
* AUTHOR: Aaron D. Gifford <me@aarongifford.com>
|
|
*
|
|
* Copyright (c) 2000-2001, Aaron D. Gifford
|
|
* All rights reserved.
|
|
*
|
|
* $From: sha2.h,v 1.1 2001/11/08 00:02:01 adg Exp adg $
|
|
*/
|
|
|
|
#ifndef __SHA2_H__
|
|
#define __SHA2_H__
|
|
|
|
#include "stdint.h"
|
|
|
|
/*** SHA-256/384/512 Various Length Definitions ***********************/
|
|
#define SHA256_BLOCK_LENGTH 64
|
|
#define SHA256_DIGEST_LENGTH 32
|
|
#define SHA256_DIGEST_STRING_LENGTH (SHA256_DIGEST_LENGTH * 2 + 1)
|
|
|
|
/*** SHA-224/256/384/512 Context Structure *******************************/
|
|
typedef struct _SHA2_CTX {
|
|
union {
|
|
uint32_t st32[8];
|
|
uint64_t st64[8];
|
|
} state;
|
|
uint64_t bitcount[2];
|
|
uint8_t buffer[SHA256_BLOCK_LENGTH];
|
|
} SHA2_CTX;
|
|
|
|
void SHA256Init(SHA2_CTX *);
|
|
void SHA256Transform(uint32_t state[8], const uint8_t [SHA256_BLOCK_LENGTH]);
|
|
void SHA256Update(SHA2_CTX *, const uint8_t *, size_t);
|
|
void SHA256Pad(SHA2_CTX *);
|
|
void SHA256Final(uint8_t [SHA256_DIGEST_LENGTH], SHA2_CTX *);
|
|
char *SHA256End(SHA2_CTX *, char *);
|
|
|
|
#endif /* __SHA2_H__ */ |