fnahashfunction.h

来自「手机加密通话软件」· C头文件 代码 · 共 41 行

H
41
字号
/* Copyright 2001,2002,2003 NAH6 BV
 * All Rights Reserved
 *
 *  $Header: /var/lib/cvs/secphone/ui/rng/fortuna/fnaHashFunction.h,v 1.4 2003/11/21 16:12:58 itsme Exp $
 *
 * This defines a generic interface to a hash function, which is implemented by
 * ui\crypto\hashSHA256.cpp
 *
 * I should have subclassed this....
*
 */


#ifndef __FNAHASHFUNCTION_H__

#include "vectorutils.h"
#include "crypto.h"

//--------------------------------------------------------------------------
// assert(HashFunction::BLOCKSIZE == BlockCypher::KEYSIZE)

class HashFunction {
public:
    HashFunction();
    ~HashFunction();

    enum { BLOCKSIZE= 32 };                 // in bytes

    static ByteVector Calculate(const ByteVector& data);

    void Reset();
    void Add(const ByteVector& data);
    ByteVector GetResult();

private:
    struct crypto_sha_state m_state;
};

#define __FNAHASHFUNCTION_H__
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?