📄 digestimplbase.h
字号:
/*!
\file DigestImplBase.h
\author Jackson
\date 13/1/2005
*/
#ifndef _LUCID_HASH_DIGESTIMPLBASE_H_
#define _LUCID_HASH_DIGESTIMPLBASE_H_
#ifdef _MSC_VER
# include <mbstring.h>
#endif
#include "ShareLib.h"
#include <string.h>
#include "EncodeAlgorithm.h"
namespace Lucid {
namespace Encryption {
//! \class TDigestImplBase
/*!
\brief Digest implementation interface
*/
class TDigestImplBase
{
public:
//! Constructor
TDigestImplBase( THashAlgorithm algorithm = NO_DIGEST):mAlgorithm(algorithm){}
//! Desstructor
/*!
*/
virtual ~TDigestImplBase() {}
/*!
\brief encode input byte array
\param input input byte array
\param output output byte array
\param input_len length of input array
\param output_len length of output array
*/
virtual void Digest(const char *inputm, unsigned char* outputd, unsigned int inputm_len, unsigned int &outputd_len) = 0;
/*!
\brief get the algorithm for digest
*/
THashAlgorithm GetAlgorithm() const
{
return mAlgorithm;
}
private:
THashAlgorithm mAlgorithm;
};
}
}
#endif // _LUCID_HASH_DIGESTIMPLBASE_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -