/*
 *               Copyright (C) 2005, BroadOn Communications Corp.
 *
 *  These coded instructions, statements, and computer programs contain
 *  unpublished  proprietary information of BroadOn Communications Corp.,
 *  and  are protected by Federal copyright law. They may not be disclosed
 *  to  third  parties or copied or duplicated in any form, in whole or in
 *  part, without the prior written consent of BroadOn Communications Corp.
 *
 */

#ifndef __SHA_TEST_H__
#define __SHA_TEST_H__

#ifdef LITTLE_ENDIAN
#define LE_ON	1
#else
#define LE_ON	0
#endif

#define MAX_SHA_SIZE	64*1024

extern u32 SHARefData[];
extern u32 SHARefHash[];

extern u32 SHAMultiBlockRefData[];
extern u32 SHAMultiBlockRefHash1[];
extern u32 SHAMultiBlockRefHash2[];

extern u32 shaSwInput[];
extern u32 shaHwInput[];

int compareData(u32 buf1[], u32 buf2[], u32 numBlocks, s32 little); 

int shaCheckRegValues(u32 addr, u32 numBlocks);

void shaDumpMemory(u32 addr, u32 numBlocks);

void shaSwHash(SHA1Context *sha, u32 *input, u32 numBlocks, u8 *swHash);

void shaConfigMemAccessForTest();

int shaChainHash(u32 addr1, u32 blocks1, u32 addr2, u32 blocks2, u32 result[],
        u32 reset);

int shaInterleaveTest(u32 input[], u32 addr, u32 numBlocks);

int shaBasicTest(u32 input[], u32 addr, u32 numBlocks, u32 intrEnable);

int shaRefTest(u32 addr);

int shaMultiBlockRefTest(u32 addr, u32 reset);

#endif /* __SHA_TEST_H__ */
