Ignore:
Timestamp:
Feb 7, 2019, 8:36:33 AM (5 years ago)
Author:
coas-nagasima
Message:

wolfsslを3.15.7にバージョンアップ

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_arm/trunk/wolfssl-3.12.2/wolfssl/wolfcrypt/sha.h

    r352 r372  
    2020 */
    2121
     22/*!
     23    \file wolfssl/wolfcrypt/sha.h
     24*/
     25
    2226
    2327#ifndef WOLF_CRYPT_SHA_H
     
    2832#ifndef NO_SHA
    2933
    30 #ifdef HAVE_FIPS
     34#if defined(HAVE_FIPS) && \
     35    defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)
     36    #include <wolfssl/wolfcrypt/fips.h>
     37#endif /* HAVE_FIPS_VERSION >= 2 */
     38
     39#if defined(HAVE_FIPS) && \
     40        (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2))
    3141#define wc_Sha             Sha
    3242#define WC_SHA             SHA
     
    4757#endif
    4858
    49 #ifndef HAVE_FIPS /* avoid redefining structs */
     59/* avoid redefinition of structs */
     60#if !defined(HAVE_FIPS) || \
     61    (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2))
    5062
    5163#ifdef WOLFSSL_MICROCHIP_PIC32MZ
    5264    #include <wolfssl/wolfcrypt/port/pic32/pic32mz-crypt.h>
     65#endif
     66#ifdef STM32_HASH
     67    #include <wolfssl/wolfcrypt/port/st/stm32.h>
    5368#endif
    5469#ifdef WOLFSSL_ASYNC_CRYPT
     
    5671#endif
    5772
     73#if !defined(NO_OLD_SHA_NAMES)
     74    #define SHA             WC_SHA
     75#endif
     76
    5877#ifndef NO_OLD_WC_NAMES
    5978    #define Sha             wc_Sha
    60     #define SHA             WC_SHA
    6179    #define SHA_BLOCK_SIZE  WC_SHA_BLOCK_SIZE
    6280    #define SHA_DIGEST_SIZE WC_SHA_DIGEST_SIZE
     
    6684/* in bytes */
    6785enum {
    68     WC_SHA              =  1,    /* hash type unique */
     86    WC_SHA              =  WC_HASH_TYPE_SHA,
    6987    WC_SHA_BLOCK_SIZE   = 64,
    7088    WC_SHA_DIGEST_SIZE  = 20,
     
    7391
    7492
    75 #ifndef WOLFSSL_TI_HASH
     93#if defined(WOLFSSL_TI_HASH)
     94    #include "wolfssl/wolfcrypt/port/ti/ti-hash.h"
     95
     96#elif defined(WOLFSSL_IMX6_CAAM)
     97    #include "wolfssl/wolfcrypt/port/caam/wolfcaam_sha.h"
     98
     99#else
    76100/* Sha digest */
    77101typedef struct wc_Sha {
    78102    #ifdef FREESCALE_LTC_SHA
    79103        ltc_hash_ctx_t ctx;
     104#elif defined(STM32_HASH)
     105        STM32_HASH_Context stmCtx;
    80106    #else
    81107        word32  buffLen;   /* in bytes          */
     
    95121        WC_ASYNC_DEV asyncDev;
    96122    #endif /* WOLFSSL_ASYNC_CRYPT */
    97 #endif /* FREESCALE_LTC_SHA */
     123#endif
    98124} wc_Sha;
    99125
    100 #else
    101     #include "wolfssl/wolfcrypt/port/ti/ti-hash.h"
    102126#endif /* WOLFSSL_TI_HASH */
    103127
     
    108132WOLFSSL_API int wc_InitSha_ex(wc_Sha* sha, void* heap, int devId);
    109133WOLFSSL_API int wc_ShaUpdate(wc_Sha*, const byte*, word32);
     134WOLFSSL_API int wc_ShaFinalRaw(wc_Sha*, byte*);
    110135WOLFSSL_API int wc_ShaFinal(wc_Sha*, byte*);
    111136WOLFSSL_API void wc_ShaFree(wc_Sha*);
Note: See TracChangeset for help on using the changeset viewer.