📄 aescryptworkerthreads.h
字号:
/*
* AESCryptWorkerThreads.h
*
* Copyright (C) 2006
* Paul E. Jones <paulej@arid.us>
* All Rights Reserved.
*
******************************************************************************
* $Id: AESCryptWorkerThreads.h,v 1.2 2007/05/14 10:41:07 paulej Exp $
******************************************************************************
*
* This file defines the AESCryptWorkerThreads class, which is
* responsible for all background encryption and decryption functions.
*
*/
#pragma once
struct WorkerData;
class AESCryptWorkerThreads
{
private:
CRITICAL_SECTION Critical_Section;
int Thread_Count;
std::list<HANDLE> Terminated_Threads;
bool StartThread( StringList *file_list,
TCHAR *passwd,
bool encrypt);
inline void DoMessageLoop();
void EncryptFiles( StringList *file_list,
TCHAR *passwd);
void DecryptFiles( StringList *file_list,
TCHAR *passwd);
public:
AESCryptWorkerThreads();
~AESCryptWorkerThreads();
// Indicates whether threads are working
bool IsBusy();
// Process files for encryption (true) or decryption (false)
void ProcessFiles( StringList *file_list,
bool encrypt);
// This should only be called by threads
// spawned by this class.
void ThreadEntry( WorkerData *worker_data);
};
struct WorkerData
{
StringList *file_list;
TCHAR passwd[MAX_PASSWD_LEN+1];
bool encrypt;
HANDLE thread_handle;
AESCryptWorkerThreads *aes_crypt_worker_threads;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -