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

📄 protomac.h

📁 一个免费的SMART CARD OS系统。
💻 H
字号:
#ifndef __PROTOMAC_H/* ============================================================================   Project Name : jayaCard TCK   Module Name  : proto/tck/cos/common/protomac.h   Version : $Id: protomac.h,v 1.25 2004/04/24 12:19:25 dgil Exp $	Description: common sources of protocol macros    The Original Code is jayaCard TCK code.    The Initial Developer of the Original Code is Gilles Dumortier.	Portions created by the Initial Developer are Copyright (C) 2002-2004 the    Initial Developer. All Rights Reserved.    Contributor(s):	Permission is granted to any individual to use, copy, or redistribute	this software so long as all of the original files are included	unmodified, that it is not sold for profit, and that this copyright	notice is retained.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   History Rev	Description   021503 dgil	wrote it from scratch   ============================================================================*/#define __PROTOMAC_H/* ============================================================================	MSK/PSK Interface   ========================================================================= */#include "msk.h"/* ============================================================================	Interface currently in use   ========================================================================= */extern jbyte	gInterface;/* ============================================================================	Socket port currently in use   ========================================================================= */extern short	gPort;extern SOCKET	sT;/* ============================================================================	T=CL block-number   ========================================================================= */extern jbyte	block_number;/* ============================================================================	sw1 sw2 of the lastest receive APDU   ========================================================================= */extern jbyte	sw1;extern jbyte	sw2;extern jword	sw1sw2;/* ============================================================================	Init/Done   ========================================================================= */void INIT(void);void DONE(int bExit);/* ============================================================================	EEPROM/RAM Management   ========================================================================= */void SAVE_EEPROM(jbyte num);void LOAD_EEPROM(jbyte num);void CLEAR_EEPROM(void);void SAVE_RAM(jbyte num);/* ============================================================================	Unlock the Locks   ========================================================================= */void UNLOCK_BOOTSTRAP(void);void UNLOCK_INIT(void);void UNLOCK_PERSO(void);void UNLOCK_BLOCKED(void);/* ============================================================================	Power On/Off   ========================================================================= */void POWERON(jbyte interf);void POWEROFF(void);void RESET(void);/* ============================================================================	T=0   ========================================================================= */void ATR(jbool b3B);/* ============================================================================	Low-Level Type A   ========================================================================= */void ATS(void);void REQA(void);void WAKEUPA(void);void ANTICOLA(void);void SELECTA(void);void HALTA(void);void PPSA(jbyte baud);/* ============================================================================	Low-Level Type B   ========================================================================= */void HALTB(void);/* ============================================================================	Hi-Level T=CL   ========================================================================= */void IBLOCK(char* apdu);void ACK();void NACK();void DESELECT();void WTX(jbyte wtx);void BAUDRATE(jbyte num);/* ============================================================================	APDU   ========================================================================= */void APDU(char* apdu,int lenR);void APDU_RES(char* apdu,jbyte lenR,jword Rsw1sw2);/* ============================================================================	CARD LIFECYCLE   ========================================================================= */#define LIFECYCLE_INIT		0x80#define LIFECYCLE_PERSO		0x81#define LIFECYCLE_APPLI		0x82#define LIFECYCLE_BLOCKED	0x84#define LIFECYCLE_INVALID	0x88/* ============================================================================	COS COMMANDS   ========================================================================= */void GETCHALLENGE(void);/* key or MSK is key==NULL / bInFile==jtrue=>EF_KEYS otherwise MSK/PSK */void EXTERNALAUTHENTICATE(jbyte* key,jbool bInFile,jbyte byKeyNum);/* key or MSK is key==NULL / bInFile==jtrue=>EF_KEYS otherwise MSK/PSK */void INTERNALAUTHENTICATE(jbyte* key,jbool bInFile,jbyte byKeyNum);/* key or MSK is key==NULL / bInFile==jtrue=>EF_KEYS otherwise MSK/PSK */void MUTUALAUTHENTICATE(jbyte* key,jbool bInFile,jbyte byKeyNum);/* ============================================================================	deactivate some stuff ...   ========================================================================= */#undef BIOS_CALL_OPCODE#define BIOS_CALL_OPCODE(n)	JSEC_FAIL/* ============================================================================    some tools ...   ========================================================================= */void RANDOM(void);/* ========================================================================= */#endif/* __PROTOMAC_H */

⌨️ 快捷键说明

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