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

📄 error.c

📁 加密解密,安全工具!很有意思的代码
💻 C
字号:
/*********************************************************************      Copyright (c) 1994-1999 Jetico, Inc., Finland*      All rights reserved.**      File: bccreate.c*      Revision: $Id: error.c,v 1.7 2005/05/14 11:25:10 crypt Rel-1.6-3 $*      Created:*      Description: implementation of error printing routine********************************************************************/#include <stdio.h>#include <stdlib.h>#include <string.h>#include <kg_defs.h>#include "misc.h"#include "config.h"char error_c[]="$Id: error.c,v 1.7 2005/05/14 11:25:10 crypt Rel-1.6-3 $";char err_str[1024];void print_error (int error){    switch ( error )    {        case ERROR_NO://            sprintf(err_str,"no errors\n");            return;// Kgsha errors        case ERROR_INTERNAL_PROBLEM:            sprintf(err_str,"Key Genarator: Internal problems\n");break;        case ERROR_INVALID_ALGORITHM:            sprintf(err_str,"Key Genarator: Invalid algorithm\n");break;        case ERROR_INCORRECT_CREATE_FLAG:            sprintf(err_str,"Key Genarator: Unsupported create flag\n");break;        case ERROR_INCORRECT_FORMAT_VERSION:            sprintf(err_str,"Key Genarator: Unsupported format version\n");break;        case ERROR_INCORRECT_BLOCK_SIGNATURE:            sprintf(err_str,"Key Genarator: Unsupported block signature\n");break;        case ERROR_DAMAGED_DATA_BLOCK:            sprintf(err_str,"Key Genarator: Damaged data block\n");break;        case ERROR_CANCELLED_BY_USER:            sprintf(err_str,"Key Genarator: Cancelled by user\n");break;        case ERROR_USER_PASSWORDS_MISMATCH:            sprintf(err_str,"Key Genarator: Password mismatch\n");break;        case ERROR_INCORRECT_PASSWORD:            sprintf(err_str,"Key Genarator: Password incorrect\n");break;        case ERROR_NOT_ENOUGH_INIT_KEYS:            sprintf(err_str,"Key Genarator: Not enough init keys\n");break;        case ERROR_INCORRECT_ENCR_ALGORITHM:            sprintf(err_str,"Key Genarator: Incorrect encryption algorithm\n");break;        case ERROR_INCORRECT_HASH_ALGORITHM:            sprintf(err_str,"Key Genarator: Incorrect hash algorithm\n");break;        case ERROR_INCORRECT_DATA_BLOCK_SIZE:            sprintf(err_str,"Key Genarator: Incorrect datablock size\n");break;        case ERROR_NOT_ENOUGH_SPACE_FOR_KEY:            sprintf(err_str,"Key Genarator: Not enough space for key\n");break;        case ERROR_INCORRECT_POOL:            sprintf(err_str,"Key Genarator: Incorrect pool\n");break;        case ERROR_HID_PASSWORD_INVALID:            sprintf(err_str,"Key Genarator: Cannot create hidden part\n"                    "please try to mount container with this password\n");break;// Config errors        case FATAL_ERROR:            sprintf(err_str,"Config: Fatal error\n");break;        case NO_MEM:            sprintf(err_str,"Config: Not enough memory\n");break;        case CONF_BAD_FNAME:            sprintf(err_str,"Config: Cannot open config file\n");break;        case CONF_FOPEN_ERR:            sprintf(err_str,"Config: Error while opening config file\n");break;        case CONF_BAD_FILE:            sprintf(err_str,"Config: Bad config file\n");break;        case TOKEN_FATAL:            sprintf(err_str,"Config: Token fatal error\n");break;        case TOKEN_TRUNC:            sprintf(err_str,"Config: Token truncated\n");break;        case TOKEN_BAD:            sprintf(err_str,"Config: Bad token\n");break;        case TOKEN_EMPTY:            sprintf(err_str,"Config: Token empty\n");break;        default:            msg(stderr,"%s\n",strerror(-error));return;    }    msg(stderr,err_str);} 

⌨️ 快捷键说明

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