fnapool.h

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

H
45
字号
/* Copyright 2001,2002,2003 NAH6 BV
 * All Rights Reserved
 *
 *  $Header: /var/lib/cvs/secphone/ui/rng/fortuna/fnaPool.h,v 1.3 2003/11/21 12:39:24 itsme Exp $
 *
 *
 */


#ifndef __FNAPOOL_H__

#include "fnaHashFunction.h"
#include "winMutex.h"

//--------------------------------------------------------------------------
class Pool {
public:
    Pool();
    ~Pool();

    void Initialize();

    void Add(const ByteVector& data);
    void Add(BYTE data);
    size_t GetSize() const;
    ByteVector Use();

    bool WaitForMutex();
    void ReleaseMutex();

private:
    ByteVector m_buffer;
    HashFunction m_hash;
    size_t m_poolsize;

    Mutex m_mutex;

    enum { HASHTHRESHOLD= 1024 };           // in bytes
    void FlushBuffer();
};


#define __FNAPOOL_H__
#endif

⌨️ 快捷键说明

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