unit ePsMod;

interface
    uses
        ePasModLib_TLB;
const
    EPAS_APP_NAME_SIZE = $20			;	
EPAS_FRIENDLY_NAME_SIZE = $20                   ;

EPAS_NULL = $0                                  ;
EPAS_API_VERSION = $200                         ;

EPAS_OPEN_NEXT = $0                             ;
EPAS_OPEN_FIRST = $1                            ;
EPAS_OPEN_CURRENT = $2                          ;
EPAS_OPEN_SPECIFIC = $3                         ;
EPAS_OPEN_MASK = $7                             ;
EPAS_OPEN_BY_NAME = $100                        ;
EPAS_OPEN_BY_GUID = $200                        ;

EPAS_CONFIG_DES_KEY_SIZE = $1                   ;
EPAS_CONFIG_RSA_MOD_SIZE = $2                   ;

EPAS_PROP_CAPABILITIES = $0                     ;
EPAS_PROP_MEM_SIZE = $1                         ;
EPAS_PROP_ROOT_ACCESSINFO = $2                 ;
EPAS_PROP_ACCESSINFO = $3                       ;
EPAS_PROP_APP_NAME = $4                         ;
EPAS_PROP_APP_GUID = $5                         ;
EPAS_PROP_VERSIONINFO = $6                      ;
EPAS_PROP_SERNUM = $7                           ;
EPAS_PROP_LED_ON = $8                           ;
EPAS_PROP_LED_OFF = $9                          ;
EPAS_PROP_CONFIGURATION = $A                    ;
EPAS_PROP_FRIENDLY_NAME = $B                    ;

EPAS_ROOT_DIR = $0                              ;
EPAS_7816_ROOT_DIR = $3F00                      ;
EPAS_AUTO_ID_BASE = $F000                       ;
EPAS_INDEX_FILE = $FFFF                         ;
EPAS_TOKEN_NAME_FILE = $FFFE                    ;

EPAS_DIR_BY_ID = $100                           ;
EPAS_DIR_BY_LONG_ID = $200                      ;
EPAS_DIR_BY_NAME = $300                         ;
EPAS_DIR_BY_GUID = $400                         ;
EPAS_DIR_BY_MASK = $F00                         ;

EPAS_FILETYPE_UNUSED = $0                       ;
EPAS_FILETYPE_DIR = $1                          ;
EPAS_FILETYPE_DATA = $2                         ;
EPAS_FILETYPE_COUNTER = $3                      ;
EPAS_FILETYPE_KEY = $4                          ;
EPAS_FILETYPE_UNKNOWN = $FF                     ;

EPAS_ACCESS_ANYONE = $0                         ;
EPAS_ACCESS_USER = $1                           ;
EPAS_ACCESS_OFFICER = $2                        ;
EPAS_ACCESS_APP = $3                            ;
EPAS_ACCESS_NONE = $7                           ;

EPAS_ACCESS_READ = $1                           ;
EPAS_ACCESS_WRITE = $2                          ;
EPAS_ACCESS_CRYPT = $4                          ;

EPAS_CAPS_MD5HMAC = $1                          ;
EPAS_CAPS_MD5XOR = $2                          ;
EPAS_CAPS_MD5CHAP = $4                         ;
EPAS_CAPS_DES = $8                             ;
EPAS_CAPS_APPAUTH = $20                        ;

EPAS_DIR_FROM_MF = $0                           ;
EPAS_DIR_FROM_CUR_DF = $10                      ;
EPAS_DIR_TO_PARENT = $20                        ;

EPAS_FILE_READ = $10                            ;
EPAS_FILE_WRITE = $20                           ;
EPAS_FILE_CRYPT = $40                           ;

EPAS_CREATE_AUTO_ID = $10000                    ;

EPAS_DELETE_RECURSIVE = $10000                  ;

EPAS_VERIFY_USER_PIN = $0                       ;
EPAS_VERIFY_SO_PIN = $1                         ;
EPAS_VERIFY_APPKEY = $2                         ;
EPAS_VERIFY_NO_HASH  = $1000                    ;
EPAS_VERIFY_HASH_UPIN= $2000                    ;

EPAS_CHANGE_USER_PIN = $0                       ;
EPAS_UNBLOCK_USER_PIN = $1                      ;
EPAS_CHANGE_SO_PIN = $2                         ;
EPAS_CHANGE_APP_KEY = $3                        ;
EPAS_CHANGE_MASK = $F                           ;

EPAS_CHANGE_NO_HASH = $1000                     ;
EPAS_CHANGE_HASH_UPIN =	$2000                   ;

EPAS_SCOPE_MF = $0                              ;
EPAS_SCOPE_DF = $1                              ;

EPAS_HASH_MD5_XOR = $0                          ;
EPAS_HASH_MD5_HMAC = $1                         ;
EPAS_HASH_MD5_CHAP = $2                         ;
EPAS_HASH_DES_MAC = $10                         ;
EPAS_HASH_TYPE_MASK = $FF                       ;

EPAS_CRYPT_DES = $0                             ;
EPAS_CRYPT_TYPE_MASK = $FF                      ;

EPAS_GENKEY_ENCRYPT = $100                      ;
EPAS_GENKEY_CREATE = $200                       ;
EPAS_DES_ENCRYPT = $80                          ;
EPAS_DES_DECRYPT = $40                          ;

FT_SUCCESS = $0                                 ;
FT_CANNOT_OPEN_DRIVER = $1      ;//$80100001
FT_INVALID_DRVR_VERSION = $2    ;//$80100002
FT_INVALID_COMMAND = $3                         ;
FT_ACCESS_DENIED = $4                           ;
FT_ALREADY_ZERO = $5                            ;
FT_UNIT_NOT_FOUND = $6                          ;
FT_DEVICE_REMOVED = $7                          ;
FT_COMMUNICATIONS_ERROR = $8                    ;
FT_DIR_NOT_FOUND = $9                           ;
FT_FILE_NOT_FOUND = $A ;//$8010000A
FT_MEM_CORRUPT = $B                             ;
FT_INTERNAL_HW_ERROR = $C                       ;
FT_INVALID_RESP_SIZE = $D                       ;
FT_PIN_EXPIRED = $E                             ;
FT_ALREADY_EXISTS = $F                          ;
FT_NOT_ENOUGH_MEMORY = $10                      ;
FT_INVALID_PARAMETER = $11                      ;
FT_INPUT_TOO_LONG = $13                         ;
FT_INVALID_FILE_SELECTED = $14                  ;
FT_DEVICE_IN_USE = $15                          ;
FT_INVALID_API_VERSION = $16                    ;
FT_TIME_OUT_ERROR = $17                         ;
FT_ITEM_NOT_FOUND = $18                         ;
FT_COMMAND_ABORTED = $19                        ;
FT_INVALID_STATUS = $FF                         ;

type
    PWVersionInfo = ^WVersionInfo;
    PWSysInfo     = ^WSysInfo;

implementation
end.
