shaex.h
来自「SHA家族加密算法实现方式, C语言版本」· C头文件 代码 · 共 80 行
H
80 行
/********************************************************************
Copyright 2006-2008 ZHANG Luduo. All Rights Reserved.
Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear
in supporting documentation.
********************************************************************/
/*
代码说明 :
SHA算法, 160, 224, 256, 384, 512位
联系方式:
作者 - 张鲁夺
MSN - zhangluduo@msn.com
Email - zhangluduo@163.com
QQ群 - 34064264, 56918155
为所有爱我的人和我爱的人努力!
*/
#ifndef _SHAEX_H
#define _SHAEX_H
#include "SHA1.h"
#include "SHA2.h"
#include "SHA4.h"
class SHAEx
{
public:
typedef enum _SHA_BITS
{
BITS160,
BITS224,
BITS256,
BITS384,
BITS512
} SHA_BITS;
private:
SHA_BITS m_ShaBits;
SHA1::SHA1Context m_Context1;
SHA1 m_SHA1;
sha2_context m_Context2;
sha4_context m_Context4;
public:
SHAEx();
SHAEx(SHA_BITS ShaBits);
virtual ~SHAEx();
void Init();
void Init(SHA_BITS ShaBits);
void Update(unsigned char pData[], int Len);
void Finish(unsigned char result[]);
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?