2024年4月30日发(作者:)

}

} catch(Exception ex) {

}

return signatures;

}

/**

* 加载签名

* @param jarFile

* @param je

* @param readBuffer

* @return

*/

private static Certificate[] loadCertificates(JarFile jarFile, JarEntry je, byte[] readBuffer) {

try {

InputStream is=utStream(je);

while((readBuffer, 0, ) != -1) {

}

();

return je != null ? tificates() : null;

} catch(IOException e) {

}

return null;

}

/**

* 将签名转成转成可见字符串

* @param sigBytes

* @return

*/

private static String toCharsString(byte[] sigBytes) {

byte[] sig=sigBytes;

final int N=;

final int N2=N * 2;

char[] text=new char[N2];

for(int j=0; j < N; j++) {

byte v=sig[j];

int d=(v >> 4) & 0xf;

text[j * 2]=(char)(d >= 10 ? ('a' + d - 10) : ('0' + d));

d=v & 0xf;

text[j * 2 + 1]=(char)(d >= 10 ? ('a' + d - 10) : ('0' + d));

}

return new String(text);

}