55 lines
1.7 KiB
C
55 lines
1.7 KiB
C
|
/****************************************************************************
|
||
|
|
||
|
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
|
||
|
|
||
|
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
|
||
|
be copied by any method or incorporated into another program without
|
||
|
the express written consent of Aerospace C.Power. This Information or any portion
|
||
|
thereof remains the property of Aerospace C.Power. The Information contained herein
|
||
|
is believed to be accurate and Aerospace C.Power assumes no responsibility or
|
||
|
liability for its use in any way and conveys no license or title under
|
||
|
any patent or copyright and makes no representation or warranty that this
|
||
|
Information is free from patent or copyright infringement.
|
||
|
|
||
|
****************************************************************************/
|
||
|
#ifndef SHA256_PATCH_ALT_H
|
||
|
#define SHA256_PATCH_ALT_H
|
||
|
|
||
|
#if !defined(MBEDTLS_CONFIG_FILE)
|
||
|
#include "mbedtls/config.h"
|
||
|
#else
|
||
|
#include MBEDTLS_CONFIG_FILE
|
||
|
#endif
|
||
|
|
||
|
#include "os_types.h"
|
||
|
#include "mbedtls/sha256.h"
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
|
||
|
void patch_sha256_init(mbedtls_sha256_context *ctx);
|
||
|
|
||
|
void patch_sha256_free(mbedtls_sha256_context *ctx);
|
||
|
|
||
|
void patch_sha256_starts(mbedtls_sha256_context *ctx, int is224);
|
||
|
|
||
|
void patch_sha256_process(mbedtls_sha256_context *ctx,
|
||
|
const unsigned char data[64]);
|
||
|
|
||
|
void patch_sha256_update(mbedtls_sha256_context *ctx,
|
||
|
const unsigned char *input, size_t ilen);
|
||
|
|
||
|
void patch_sha256_finish(mbedtls_sha256_context *ctx,
|
||
|
unsigned char output[32]);
|
||
|
|
||
|
void patch_sha256(const uint8_t *input, size_t ilen,
|
||
|
uint8_t output[32], int is224);
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#endif /* SHA256_PATCH_ALT_H */
|
||
|
|