⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kg_defs.h

📁 加密解密,安全工具!很有意思的代码
💻 H
字号:
/******************************************************************* * *	Copyright (c) 1994-1999 Jetico, Inc., Finland *	All rights reserved. * *	File: kg_defs.h *	Revision:  $Id: kg_defs.h,v 1.2 2005/05/14 06:50:36 crypt Rel-1.6-3 $ *	Created: *	Description: declaration of error codes and flags * *******************************************************************/#ifndef __KG_DEFS#define __KG_DEFS#define KGSHA_ID	2#define KGSHA256_ID	3#define	MAXIMUM_KEY_SIZE_BYTES		64#define	MAXIMUM_DIGEST_SIZE_BYTES	32#define MAXIMUM_NUMBER_OF_KEYS		8// For the definitions below NOTE:// MUST BE: (CONTAINER_ID_LENGTH + VERIFY_BYTES_LENGTH) < MAXIMUM_KEY_SIZE_BYTES #define CONTAINER_ID_LENGTH               4#define VERIFY_BYTES_LENGTH               16#define ALTERNATIVE_BLOCK_RESERVED_LENGTH (MAXIMUM_KEY_SIZE_BYTES - (CONTAINER_ID_LENGTH + VERIFY_BYTES_LENGTH))#define PASSWORD_MINIMUM_LENGTH 8#define PASSWORD_MAXIMUM_LENGTH 128#define SEED_LENGTH    128#define IVECTOR_LENGTH 8/******************************************************* * *	Error codes * *******************************************************/#define ERROR_NO				0x00000000#define ERROR_INTERNAL_PROBLEM			0x00002001#define ERROR_INVALID_ALGORITHM			0x00002002#define ERROR_INCORRECT_CREATE_FLAG		0x00002003#define ERROR_INCORRECT_FORMAT_VERSION		0x00002004#define ERROR_INCORRECT_BLOCK_SIGNATURE		0x00002005#define ERROR_DAMAGED_DATA_BLOCK		0x00002006#define ERROR_CANCELLED_BY_USER			0x00002007#define ERROR_USER_PASSWORDS_MISMATCH		0x00002008#define ERROR_INCORRECT_PASSWORD		0x00002009#define ERROR_NOT_ENOUGH_INIT_KEYS		0x0000200a#define ERROR_INCORRECT_ENCR_ALGORITHM		0x0000200b#define ERROR_INCORRECT_HASH_ALGORITHM		0x0000200c#define ERROR_INCORRECT_DATA_BLOCK_SIZE		0x0000200d#define ERROR_NOT_ENOUGH_SPACE_FOR_KEY		0x0000200e#define ERROR_INCORRECT_POOL            	0x0000200f#define ERROR_NO_JUST_GO_BACK               0x00002010#define ERROR_BUFFER_TOO_SMALL              0x00002011#define ERROR_IN_GENERATING_ASYM_KEYS       0x00002012#define ERROR_HID_PASSWORD_INVALID          0x00002013#define ERROR_MASTER_PASSWORD_ENTERED       0x00002014/******************************************************* * *	Create flags that specify what the CreateKeyHandle() *	procedure has to do. * *******************************************************//* new container is created, one password  will be used for opening it*/#define CFLAG_CREATE_WITH_SINGLE_PASSWORD		0x00000001/*The CreateKeyHandle procedure gets Data block thatcontains information allowing to verify password entered by user. If the password is correct, load encryption key and return Key Handle*/#define CFLAG_VERIFY_AND_LOAD_KEY				0x00000002/*User wishes to change his password. Ask him to enter old and new passwords, then correct Data block according to the new password*/#define CFLAG_CHANGE_PASSWORD					0x00000003#define CFLAG_ADD_NEW_PASSWORD					0x00000004#define CFLAG_REMOVE_ADDITIONAL_PASSWORD		0x00000005#define CFLAG_CREATE_HIDDEN_PART                0x00000006// Miscelleneous definitions#define CFLAG_LEAST_AVAILABLE	CFLAG_CREATE_WITH_SINGLE_PASSWORD#define CFLAG_MOST_AVAILABLE	CFLAG_CREATE_HIDDEN_PART#define CORRECT_CFLAG( cFlag ) (	(cFlag >= CFLAG_LEAST_AVAILABLE) && (cFlag <= CFLAG_MOST_AVAILABLE) )#endif /*__KG_DEFS */

⌨️ 快捷键说明

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