freeotfe4pdacypherapi.h

来自「文件驱动加密,功能强大,可产生加密分区,支持AES,MD2,MD4,MD5MD2」· C头文件 代码 · 共 149 行

H
149
字号
// Description: FreeOTFE Cypher Device Driver API
// By Sarah Dean
// Email: sdean12@sdean12.org
// WWW:   http://www.FreeOTFE.org/
//
// -----------------------------------------------------------------------------
//


#ifndef _FreeOTFE4PDACypherAPI_H
#define _FreeOTFE4PDACypherAPI_H   1

#include "FreeOTFECypherAPICommon.h"

// Required for definition of ULONG
#include <windef.h>

// Following is required for the "_T" macro
/// #include <tchar.h>

#include <objbase.h>


// =========================================================================
// Exported functions

#define DLLEXPORT_CYPHER_IDENTIFYDRIVER TEXT("CypherIdentifyDriver")
typedef DWORD (* PCypherDLLFnIdentifyDriver)(
                                 DIOC_CYPHER_IDENTIFYDRIVER*
                                );
DWORD
CypherIdentifyDriver(
    DIOC_CYPHER_IDENTIFYDRIVER* Buffer
);


#define DLLEXPORT_CYPHER_IDENTIFYSUPPORTED TEXT("CypherIdentifySupported")
typedef DWORD (* PCypherDLLFnIdentifySupported)(
                                 unsigned int,
                                 DIOC_CYPHER_IDENTIFYSUPPORTED*
                                );
DWORD
CypherIdentifySupported(
    int BufferSize,  // In bytes
    DIOC_CYPHER_IDENTIFYSUPPORTED* Buffer
);

#define DLLEXPORT_CYPHER_GETCYPHERDETAILS TEXT("CypherGetCypherDetails")
typedef DWORD (* PCypherDLLFnGetCypherDetails)(
                                 GUID*,
                                 CYPHER*
                                );
DWORD
CypherGetCypherDetails(
    IN     GUID* CypherGUID,
    IN OUT CYPHER* CypherDetails
);


#define DLLEXPORT_CYPHER_ENCRYPT TEXT("CypherEncrypt")
typedef DWORD (* PCypherDLLFnEncrypt)(
                            DWORD,
                            DIOC_CYPHER_DATA_IN*,
                            DWORD,
                            DIOC_CYPHER_DATA_OUT* 
                         );
DWORD
CypherEncrypt(
    IN      DWORD BufferInLen,
    IN      DIOC_CYPHER_DATA_IN* BufferIn,
    IN      DWORD BufferOutLen,
    IN      DIOC_CYPHER_DATA_OUT* BufferOut
);


#define DLLEXPORT_CYPHER_ENCRYPTWITHASCII TEXT("CypherEncryptWithASCII")
typedef DWORD (* PCypherDLLFnEncryptWithASCII)(
                            IN      GUID*,
                            IN      int,  // In bits
                            IN      char*,
                            IN      char*,  // ASCII representation of "Key"
                            IN      int,  // In bits
                            IN      char*,
                            IN      int,  // In bytes
                            IN      char*,
                            OUT     char*
                         );
DWORD
CypherEncryptWithASCII(
    IN      GUID* CypherGUID,
    IN      int KeyLength,  // In bits
    IN      char *Key,
    IN      char *KeyASCII,  // ASCII representation of "Key"
    IN      int IVLength,  // In bits
    IN      char *IV,
    IN      int PlaintextLength,  // In bytes
    IN      char *PlaintextData,
    OUT     char *CyphertextData
);


#define DLLEXPORT_CYPHER_DECRYPT TEXT("CypherDecrypt")
typedef DWORD (* PCypherDLLFnDecrypt)(
                            DWORD,
                            DIOC_CYPHER_DATA_IN*,
                            DWORD,
                            DIOC_CYPHER_DATA_OUT* 
                         );
DWORD
CypherDecrypt(
    IN      DWORD BufferInLen,
    IN      DIOC_CYPHER_DATA_IN* BufferIn,
    IN      DWORD BufferOutLen,
    IN      DIOC_CYPHER_DATA_OUT* BufferOut
);


#define DLLEXPORT_CYPHER_DECRYPTWITHASCII TEXT("CypherDecryptWithASCII")
typedef DWORD (* PCypherDLLFnDecryptWithASCII)(
                            IN      GUID*,
                            IN      int,  // In bits
                            IN      char*,
                            IN      char*,  // ASCII representation of "Key"
                            IN      int,  // In bits
                            IN      char*,
                            IN      int,  // In bytes
                            IN      char*,
                            OUT     char*
                         );
DWORD
CypherDecryptWithASCII(
    IN      GUID* CypherGUID,
    IN      int KeyLength,  // In bits
    IN      char *Key,
    IN      char *KeyASCII,  // ASCII representation of "Key"
    IN      int IVLength,  // In bits
    IN      char *IV,
    IN      int CyphertextLength,  // In bytes
    IN      char *CyphertextData,
    OUT     char *PlaintextData
);


// =========================================================================
// =========================================================================

#endif

⌨️ 快捷键说明

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