/* crypto/sha/sha.h */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 * 
 * This library is free for commercial and non-commercial use as long as
 * the following conditions are aheared to.  The following conditions
 * apply to all code found in this distribution, be it the RC4, RSA,
 * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
 * included with this distribution is covered by the same copyright terms
 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
 * 
 * Copyright remains Eric Young's, and as such any Copyright notices in
 * the code are not to be removed.
 * If this package is used in a product, Eric Young should be given attribution
 * as the author of the parts of the library used.
 * This can be in the form of a textual message at program startup or
 * in documentation (online or textual) provided with the package.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *    "This product includes cryptographic software written by
 *     Eric Young (eay@cryptsoft.com)"
 *    The word 'cryptographic' can be left out if the rouines from the library
 *    being used are not cryptographic related :-).
 * 4. If you include any Windows specific code (or a derivative thereof) from 
 *    the apps directory (application code) you must include an acknowledgement:
 *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
 * 
 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * 
 * The licence and distribution terms for any publically available version or
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
 * copied and put under another distribution licence
 * [including the GNU Public Licence.]
 */
 /*****************************************************************************
  *
  * Filename:
  * ---------
  *    sha.h
  *
  * Project:
  * --------
  *   Maui_Software
  *
  * Description:
  * ------------
  *   SHA1 Engine
  *
  * Author:
  * -------
  *  Leona Chou (mtk01890)
  *
  *============================================================================
  *             HISTORY
  * Below this line, this part is controlled by ClearCase. DO NOT MODIFY!!
  *------------------------------------------------------------------------------
  * $Log$
  *
  * 11 26 2015 raymondwt.chen
  * [MOLY00150233] [Jade] CHL and CHE design change
  * .Remove sha1, md4, mac_sha1 from CHE and mark rsa tempararily
  *
  * 08 13 2015 raymondwt.chen
  * [MOLY00137123] [UMOLY] Elbrus Che engine porting
  * .Fix build error
 *
 * 03 16 2011 leona.chou
 * removed!
 * .
  *
  *------------------------------------------------------------------------------
  * Upper this line, this part is controlled by ClearCase. DO NOT MODIFY!!
  *============================================================================
  ****************************************************************************/
#ifndef HEADER_SHA_H
#define HEADER_SHA_H

#ifdef  __cplusplus
extern "C" {
#endif

#if defined(__LP32__)
#define SHA_LONG unsigned long
#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)
#define SHA_LONG unsigned long
#define SHA_LONG_LOG2 3
#else
#define SHA_LONG unsigned int
#endif

//typedef unsigned int size_t;

#define SHA_LBLOCK	16
#define SHA_CBLOCK	(SHA_LBLOCK*4)	/* SHA treats input data as a
					 * contiguous array of 32 bit
					 * wide big-endian values. */
#define SHA_LAST_BLOCK  (SHA_CBLOCK-8)
#define SHA_DIGEST_LENGTH 20

typedef struct SHAstate_st
{
    SHA_LONG h0,h1,h2,h3,h4;
    SHA_LONG Nl,Nh;
    SHA_LONG data[SHA_LBLOCK];
    unsigned int num;
} SHA_CTX;

/*#ifndef OPENSSL_NO_SHA1
int CHE_SHA1_Init(SHA_CTX *c);
int CHE_SHA1_Update(SHA_CTX *c, const void *data, size_t len);
int CHE_SHA1_Final(unsigned char *md, SHA_CTX *c);
void CHE_SHA1_Transform(SHA_CTX *c, const unsigned char *data);
#endif*/

#define SHA256_CBLOCK	(SHA_LBLOCK*4)	/* SHA-256 treats input data as a
					 * contiguous array of 32 bit
					 * wide big-endian values. */
#define SHA224_DIGEST_LENGTH	28
#define SHA256_DIGEST_LENGTH	32

typedef struct SHA256state_st
{
    SHA_LONG h[8];
    SHA_LONG Nl,Nh;
    SHA_LONG data[SHA_LBLOCK];
    unsigned int num,md_len;
} SHA256_CTX;

#ifndef OPENSSL_NO_SHA256
int CHE_SHA224_Init(SHA256_CTX *c);
int CHE_SHA224_Update(SHA256_CTX *c, const void *data, size_t len);
int CHE_SHA224_Final(unsigned char *md, SHA256_CTX *c);
int CHE_SHA256_Init(SHA256_CTX *c);
int CHE_SHA256_Update(SHA256_CTX *c, const void *data, size_t len);
int CHE_SHA256_Final(unsigned char *md, SHA256_CTX *c);
void CHE_SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
#endif

#define SHA384_DIGEST_LENGTH	48
#define SHA512_DIGEST_LENGTH	64

#ifndef OPENSSL_NO_SHA512
#define SHA512_CBLOCK	(SHA_LBLOCK*8)	/* SHA-512 treats input data as a
					 * contiguous array of 64 bit
					 * wide big-endian values. */
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
#define SHA_LONG64 unsigned __int64
#define U64(C)     C##UI64
#elif defined(__arch64__)
#define SHA_LONG64 unsigned long
#define U64(C)     C##UL
#else
#define SHA_LONG64 unsigned long long
#define U64(C)     C##ULL
#endif

typedef struct SHA512state_st
{
    SHA_LONG64 h[8];
    SHA_LONG64 Nl,Nh;
    union {
        SHA_LONG64	d[SHA_LBLOCK];
        unsigned char	p[SHA512_CBLOCK];
    } u;
    unsigned int num,md_len;
} SHA512_CTX;
#endif

#ifndef OPENSSL_NO_SHA512
int CHE_SHA384_Init(SHA512_CTX *c);
int CHE_SHA384_Update(SHA512_CTX *c, const void *data, size_t len);
int CHE_SHA384_Final(unsigned char *md, SHA512_CTX *c);
unsigned char *CHE_SHA384(const unsigned char *d, size_t n,unsigned char *md);
int CHE_SHA512_Init(SHA512_CTX *c);
int CHE_SHA512_Update(SHA512_CTX *c, const void *data, size_t len);
int CHE_SHA512_Final(unsigned char *md, SHA512_CTX *c);
unsigned char *CHE_SHA512(const unsigned char *d, size_t n,unsigned char *md);
void CHE_SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
#endif

#ifdef  __cplusplus
}
#endif

#endif
