?? pki_certid.java
字號:
/**
* @(#)PKI_CERTID.java 2003/05/06
*
* Copyright(c) 2003 Wellhope Inc. All rights reserved.
*/
package psic;
/**
* @Title PKI_CERTID Class
* @Description PKI_CERTID類記錄PKI證書ID信息
* @Version 1.0.0
* @Author Zhuchengmin
*/
public class PKI_CERTID
{
private final int MAX_SN_SIZE=8; //序列號最大長度
private byte[] serialNumber;//序列號
public PKI_DATA iNameHash;//名稱哈希值
public PKI_DATA iKeyHash;//Key的哈希值
public PKI_CERTID()
{
serialNumber=null;
iNameHash=new PKI_DATA();
iKeyHash=new PKI_DATA();
}
/*設置序列號*/
public void setSerialNumber(byte[] b_sn)
{
serialNumber = fillBytes(b_sn,MAX_SN_SIZE);
}
/*返回序列號*/
public byte[] getSerialNumber()
{
return serialNumber;
}
private byte[] fillBytes(byte[] b_in, int size)
{
byte[] b_out = new byte[size];
for(int i=0;i<size;i++)
{
if(i>=b_in.length)
b_out[i]=0;
else
b_out[i]=b_in[i];
}
return b_out;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -