DELL
2025-04-28 e6eb7fb0af366e370f125668d62e89eb0004f517
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
package com.softkey;
 
public class jsyunew3
{
    //»ñµ½ËøµÄ°æ±¾
    public static native int GetVersion(String InPath);
    //»ñµ½ËøµÄÀ©Õ¹°æ±¾
    public static native int GetVersionEx(String InPath);
    //»ñµ½ËøµÄID
    public static native long GetID_1(String InPath);
    public static native long GetID_2(String InPath);
    //·µ»Ø×îºóµÄ´íÎóÐÅÏ¢
    public static native long get_LastError();
    //²éÕÒ¼ÓÃÜËø
    public static native String FindPort(int start);
    //²éÕÒÖ¸¶¨µÄ¼ÓÃÜËø(ʹÓÃÆÕͨËã·¨Ò»)
    public static native String FindPort_2(int start,long in_data,long verf_data);
    //²éÕÒÖ¸¶¨µÄ¼ÓÃÜËø(ʹÓÃÆÕͨËã·¨¶þ)
    public static native String FindPort_3(int start, long in_data, long verf_data);
 
    //ÉèÖöÁÃÜÂë
    public static native int SetReadPassword(String W_hkey, String W_lkey, String new_hkey, String new_lkey, String InPath);
    //ÉèÖÃдÃÜÂë
    public static native int SetWritePassword(String W_hkey, String W_lkey, String new_hkey, String new_lkey, String InPath);
    //ÆÕͨËã·¨º¯Êý
    public static native int sWriteEx_New(int in_data, String KeyPath);
    public static native int sWrite_2Ex_New(int in_data, String KeyPath);
    public static native int sWriteEx(int InData, String InPath);
    public static native int sWrite_2Ex(int InData, String InPath);
    public static native long sRead(String InPath);
    public static native int sWrite(long InData,String InPath);
    public static native int sWrite_2(long InData,String InPath);
    //´Ó¼ÓÃÜËøÖжÁȡһÅú×Ö½Ú
    public static native int YReadEx(short Address, short len, String HKey, String LKey, String InPath);
    //´Ó¼ÓÃÜËøÖжÁȡһ¸ö×Ö½Ú£¬Ò»°ã²»Ê¹ÓÃ
    public static native int YRead(short Address, String HKey, String LKey, String InPath);
    //´Ó»º³åÇøÖлñµÃÊý¾Ý
    public static native short GetBuf(int pos);
    //дһÅú×Ö½Úµ½¼ÓÃÜËøÖÐ
    public static native int YWriteEx(short Address, short len, String HKey, String LKey, String InPath);
    //дһ¸ö×Ö½Úµ½¼ÓÃÜËøÖУ¬Ò»°ã²»Ê¹ÓÃ
    public static native int YWrite(short inData, short Address, String HKey, String LKey, String InPath);
    //ÉèÖÃҪдÈëµÄ»º³åÇøµÄÊý¾Ý
    public static native int SetBuf(int pos, short Data);
    //´Ó¼ÓÃÜËøÖжÁ×Ö·û´®-ÐÂ
    public static native String NewReadString(int Address, int len, String HKey, String LKey, String InPath);
    //д×Ö·û´®µ½¼ÓÃÜËøÖÐ-ÐÂ
    public static native int NewWriteString(String InString, int Address, String HKey, String LKey, String InPath);
    //¼æÈݾɵĶÁд×Ö·û´®º¯Êý£¬²»ÔÙʹÓÃ
    public static native String YReadString(short Address, short len, String HKey, String LKey,String InPath);
    public static native int YWriteString(String InString, short Address, String HKey, String LKey,String InPath);
    //'ÉèÖÃÔöÇ¿Ëã·¨ÃÜÔ¿Ò»
    public static native int SetCal_2(String Key, String InPath);
    //ʹÓÃÔöÇ¿Ëã·¨Ò»¶Ô×Ö·û´®½øÐмÓÃÜ
    public static native String EncString(String InString, String InPath);
    //ʹÓÃÔöÇ¿Ëã·¨Ò»¶Ô¶þ½øÖÆÊý¾Ý½øÐмÓÃÜ
    public static native int Cal(String InPath);
    //'ÉèÖÃÔöÇ¿Ëã·¨ÃÜÔ¿¶þ
    public static native int SetCal_New(String Key, String InPath);
    //ʹÓÃÔöÇ¿Ëã·¨¶þ¶Ô×Ö·û´®½øÐмÓÃÜ
    public static native String EncString_New(String InString, String InPath);
    //ʹÓÃÔöÇ¿Ëã·¨¶þ¶Ô¶þ½øÖÆÊý¾Ý½øÐмÓÃÜ
    public static native int Cal_New(String InPath);
    //ʹÓÃÔöÇ¿Ëã·¨¶Ô×Ö·û´®½øÐнâÃÜ
    public static native String DecString(String InString, String Key);
    //ÉèÖÃÒª¼ÓÃܵĻº³åÇøµÄÊý¾Ý
    public static native int SetEncBuf(int pos, short Data);
    //´Ó»º³åÇøÖлñÈ¡¼ÓÃܺóµÄÊý¾Ý
    public static native short GetEncBuf(int pos);
    
    //·µ»Ø¼ÓÃÜËøµÄ¹«Ô¿¶Ô
    public static native String GetPubKeyX(String InPath);
    public static native String GetPubKeyY(String InPath);
    //Éú³ÉSM2ÃÜÔ¿¶Ô£¬»ñȡ˽Կ¼°¹«Ô¿
    public static native String get_GenPriKey();
    public static native String get_GenPubKeyX();
    public static native String get_GenPubKeyY();
    
    //Éú³ÉSM2ÃÜÔ¿¶Ô,²úÉúÃÜÔ¿¶Ô
    public static native int StarGenKeyPair(String InPath);
    public static native String SM2_EncString(String InString,String InPath);
    public static native String SM2_DecString(String InString,String Pin,String InPath);
    public static native int YtSetPin(String OldPin,String NewPin,String InPath);
    //¶ÔÏûÏ¢½øÐÐÇ©Ãû
    public static native String YtSign(String msg,String Pin,String InPath);
    //¶ÔÇ©Ãû½øÐÐÑéÖ¤
    public static native boolean YtVerfiy(String id,String msg,String PubKeyX,String  PubKeyY,String VerfiySign,String InPath);
    
    //ÉèÖÃSM2ÃÜÔ¿¶Ô¼°Éí·Ý
    public static native int Set_SM2_KeyPair(String PriKey,String PubKeyX,String PubKeyY,String sm2UserName,String InPath);
    
    //»ñÈ¡¼ÓÃÜËøÖеÄÉí·Ý
    public static native String GetSm2UserName(String InPath);
    //·µ»ØËøµÄÓ²¼þоƬΨһID
    public static native String GetChipID(String InPath);
    //²éÕÒ¼ÓÃÜËø£¬·µ»ØµÄÊÇUÅ̵Ä·¾¶,¼´UÅ̵ÄÅÌ·û£¬Í¨¹ýÕâ¸ö·¾¶Ò²¿ÉÒÔÖ±½Ó²Ù×÷Ëø
    public static native String FindU(int start);
    //²éÕÒÖ¸¶¨µÄ¼ÓÃÜËø£¨Ê¹µÃÆÕͨËã·¨¶þ£©£¬·µ»ØµÄÊÇUÅ̵Ä·¾¶,¼´UÅ̵ÄÅÌ·û£¬Í¨¹ýÕâ¸ö·¾¶Ò²¿ÉÒÔÖ±½Ó²Ù×÷Ëø
    public static native String FindU_3(int start,int in_data,int verf_data);
    //²éÕÒÖ¸¶¨µÄ¼ÓÃÜËø£¨Ê¹µÃÆÕͨËã·¨Ò»£©£¬·µ»ØµÄÊÇUÅ̵Ä·¾¶,¼´UÅ̵ÄÅÌ·û£¬Í¨¹ýÕâ¸ö·¾¶Ò²¿ÉÒÔÖ±½Ó²Ù×÷Ëø
    public static native String FindU_2(int start,int in_data,int verf_data);
    //ÉèÖÃUÅ̲¿·ÖΪֻ¶Á״̬£¬
    public static native int SetUReadOnly(String InPath);
    //ÉèÖÃÊÇ·ñÏÔʾUÅ̲¿·ÖÅÌ·û£¬ÕæÎªÏÔʾ£¬·ñΪ²»ÏÔʾ
    public static native int SetHidOnly(boolean IsHidOnly,String InPath);
    //·µ»ØUÅ̲¿·ÖÊÇ·ñΪֻ¶Á״̬£¬ÕæÎªÖ»¶Á
    public static native boolean IsUReadOnly(String InPath);
    
    //ÉèÖÃËøµÄID
    public static native int SetID(String Seed, String InPath);
    //ÉèÖÃÆÕͨËã·¨
    public static native int SetCal(String Old_hkey, String Old_lkey, String new_hkey, String new_lkey, String InPath);
    //»ñÈ¡³ö³§Î¨Ò»±àÂë
    public static native String GetProduceDate(String InPath);
 
    //***³õʼ»¯¼ÓÃÜËøº¯Êý
    public static native int ReSet(String InPath);
 
    //ÒÔÏÂÊÇ´úÂëÏÂÔØ¼°ÔËÐÐËùÐèÒªµÄº¯Êý
    //²éÕÒD8¼ÓÃܹ·
    public static native String FindD8(int pos,String VerfCode);
    //»ñÈ¡¹¦Äܰ汾
    public static native int GetFuncVer(String InPath);
 
    //ÏÂÔØÒªÔËÐеĴúÂë
    public static native int  DownLoadBinFile(boolean bIsEnc,String BinFile,String InPath);
    public static native int  DownLoadData(boolean bIsEnc,byte[] Buf,int BufLen,String InPath);
    public static native String  EncBinFile(String BinFile,String Key);
    //ÔËÐк¯Êý
    public static native int RunFuntion(String FunctionName,String InPath );
    public static native int ContinuRun(String InPath);
 
    //ÉèÖóõʼ»¯±äÁ¿Öµµ½ËøÖÐ
    public static native int  SetVar(byte []Buf,int MemBeginPos,int BufLen,String InPath);
    //´ÓËøÖзµ»ØÔËÐнá¹û
    public static native byte[] GetVar(int MemBeginPos,int OutBufLen,String InPath);
 
    //ÉèÖÃÏÂÔØÃÜÔ¿
    public static native String  SetDownLodKey(String OldKey,String NewKey,String InPath);
    public static native int  OpenKey(String VerfCode,String InPath);//ÏÂÔØÊý¾Ýʱ£¬ÒªÏÈ´ò¿ªKEY£¬Õâ¸öº¯ÊýÒ²¿ÉÒÔÓÃÓÚÑéÖ¤ÊÇ·ñÊÇ×Ô¼ºµÄKEY
    public static native int  CloseKey(String InPath);//¹Ø±ÕKEY£¬ÓÃÓÚ½ûÖ¹ÏÂÔØ£¬ÒªÏÂÔØBINÎļþµ½KYEʱ£¬±ØÐëÒªÏÈ´ò¿ª
 
 
    //µ÷ÓÃÉÏλ»úAPI£¬
    public static native byte [] GetApiParam(int OutLen,String InPath);//»ñȡҪÊäÈëµÄ²ÎÊýÊý¾Ý
    public static native int  SetApiParam(byte []Buf,int InLen,String InPath);//ÉèÖÃÒª·µ»ØµÄ²ÎÊýÊý¾Ý
 
    //²Ù×÷28K´¢´æÆ÷
    public static native int WriteEprom(byte[]InBuf,int Addr,int len,String HKey,String LKey,String InPath);
    public static native byte [] ReadEprom(int Addr,int len,String HKey,String LKey,String InPath);
    public static native int NewSetReadPassword(String OldWriteHKey,String OldWriteLKey,String NewHKey,String NewLKey,String InPath);
    public static native int NewSetWritePassword(String OldWriteHKey,String OldWriteLKey,String NewHKey,String NewLKey,String InPath);
 
    //ʱ¼äÏÞÖÆ
    public static native int GetLimitYear(String InPath);
    public static native int GetLimitMonth(String InPath);
    public static native int GetLimitDay(String InPath);
    public static native int GetUserID(String InPath);
    public static native int GetLeaveNumber(String InPath);
    public static native int GetLeaveDays(String CurDate,String InPath);
    public static native int CheckBind(boolean bIsAdd,String MacAddr,String InPath);
    public static native int CheckNumber(String InPath);
    public static native int CheckDate(String InDate,String InPath);
    public static native int UpdateAuth(byte Flag,String Auth,String InPath);
    public static native int DateAuth(int CurYear,byte CurMonth,byte CurDay,
        int LimitYear,byte LimitMonth,byte LimitDay,int UserID,
        String Key,String InPath);
    public static native int NumberAuth(int Number,int UserID,String Key,String InPath);
    public static native int BindAuth(boolean bReBind,int BindCount,int UserID,String Key,String InPath);
    public static native int GetLimitBindCount(String InPath);
    public static native int GetAlreadyBindCoun(String InPath);
    public static native String MakeBindAuth(boolean bReBind, int BindCount, int UserID, String Key);
    public static native String MakeNumberAuth(int Number,int UserID,String Key);
    public static native String MakeDateAuth(int CurYear,byte CurMonth,byte CurDay,
        int LimitYear,byte LimitMonth,byte LimitDay,int UserID,
        String Key);
    public static native int CloseUsbHandle(String InPath);
    static
     {
         String DllName;
         String JdkBit=System.getProperty("sun.arch.data.model");
        if(JdkBit.equals("32"))
        {
            DllName="Jsyunew3";
             
        }
        else
        {
            DllName = "Jsyunew3_64";
            
        }
        try 
        {
            
             System.loadLibrary(DllName);
        }
        catch (UnsatisfiedLinkError e)
        {
            System.err.println("Can//t find library:" + DllName);
            System.exit(-1);
        }
     }
 
}