|
JavaTM Platform Standard Ed. 6 |
|||||||||
��һ���� ��һ���� | ��� ��� ������ | |||||||||
ժҪ�� Ƕ�� | �ֶ� | ���췽�� | ���� | ��ϸ��Ϣ�� �ֶ� | ���췽�� | ���� |
java.lang.Objectjava.security.SignatureSpi
public abstract class SignatureSpi
����Ϊ Signature
�ඨ���������ṩ�߽ӿ� (SPI)���������ṩ����ǩ���㷨���ܡ�����ǩ��������֤�������ݵ���ʵ�Ժ������ԡ�
�����е����г�����������ÿ����Ҫ�ṩʵ���ض�ǩ���㷨�ļ��ܷ����ṩ��ʵ�֡�
Signature
�ֶ�ժҪ | |
---|---|
protected SecureRandom |
appRandom
Ӧ�ó���ָ�������Դ�� |
���췽��ժҪ | |
---|---|
SignatureSpi()
|
����ժҪ | |
---|---|
Object |
clone()
�����ʵ�ֿ��Ը��ƣ���һ�������� |
protected abstract Object |
engineGetParameter(String param)
�ѹ�ʱ�� |
protected AlgorithmParameters |
engineGetParameters()
�˷��������ṩ����д���Է������ǩ���������ʹ�õIJ����������ǩ������δʹ���κβ������� null�� |
protected abstract void |
engineInitSign(PrivateKey privateKey)
ͨ������ǩ��������ָ��˽Կ��ʼ����ǩ������ |
protected void |
engineInitSign(PrivateKey privateKey,
SecureRandom random)
ͨ������ǩ��������ָ��˽Կ�����Դ��ʼ����ǩ������ |
protected abstract void |
engineInitVerify(PublicKey publicKey)
ͨ��������֤������ָ����Կ��ʼ����ǩ������ |
protected void |
engineSetParameter(AlgorithmParameterSpec params)
�˷��������ṩ����д���Ա�ʹ��ָ���IJ������ó�ʼ����ǩ�����档 |
protected abstract void |
engineSetParameter(String param,
Object value)
�ѹ�ʱ�� �� engineSetParameter ȡ���� |
protected abstract byte[] |
engineSign()
��������Ϊֹ���и��µ����ݵ�ǩ���ֽڡ� |
protected int |
engineSign(byte[] outbuf,
int offset,
int len)
��ɴ�ǩ������������ offset ��ʼ���õ���ǩ���ֽڱ������ṩ�Ļ����� outbuf �С� |
protected abstract void |
engineUpdate(byte b)
ʹ��ָ�����ֽڸ���Ҫǩ������֤�����ݡ� |
protected abstract void |
engineUpdate(byte[] b,
int off,
int len)
ʹ��ָ���� byte ���飬��ָ����ƫ������ʼ����Ҫǩ������֤�����ݡ� |
protected void |
engineUpdate(ByteBuffer input)
ʹ��ָ���� ByteBuffer ����Ҫǩ������֤�����ݡ� |
protected abstract boolean |
engineVerify(byte[] sigBytes)
��֤�����ǩ���� |
protected boolean |
engineVerify(byte[] sigBytes,
int offset,
int length)
��ָ���� byte �����У���ָ����ƫ��������ʼ����֤�����ǩ���� |
���� java.lang.Object �̳еķ��� |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
�ֶ���ϸ��Ϣ |
---|
protected SecureRandom appRandom
���췽����ϸ��Ϣ |
---|
public SignatureSpi()
������ϸ��Ϣ |
---|
protected abstract void engineInitVerify(PublicKey publicKey) throws InvalidKeyException
publicKey
- ��ǩ��������֤�ı�ʶ�Ĺ�Կ��
InvalidKeyException
- �����Կδ�õ���ȷ���롢������ʧ�ȵȡ�protected abstract void engineInitSign(PrivateKey privateKey) throws InvalidKeyException
privateKey
- ��������ǩ���ı�ʶ��˽Կ��
InvalidKeyException
- �����Կδ�õ���ȷ���롢������ʧ�ȵȡ�protected void engineInitSign(PrivateKey privateKey, SecureRandom random) throws InvalidKeyException
�ѽ��˾��巽�����ӵ�����ǰ������ij������С���Ϊ�����ݣ�������Ϊ��������
privateKey
- ��������ǩ���ı�ʶ��˽Կ��random
- ���Դ
InvalidKeyException
- �����Կδ�õ���ȷ���롢������ʧ�ȵȡ�protected abstract void engineUpdate(byte b) throws SignatureException
b
- ���ڸ��µ��ֽڡ�
SignatureException
- �������δ�õ���ȷ��ʼ����protected abstract void engineUpdate(byte[] b, int off, int len) throws SignatureException
b
- byte ����off
- byte ���鿪ʼ����ƫ����len
- Ҫʹ�õ��ֽ�������ƫ������ʼ�����㣩
SignatureException
- �������δ�õ���ȷ��ʼ��protected void engineUpdate(ByteBuffer input)
data.position()
����ʼ�� data.remaining()
�ֽڡ�����ʱ����������λ�ý����������ƣ������Ʋ�δ�ı䡣
input
- the ByteBufferprotected abstract byte[] engineSign() throws SignatureException
SignatureException
- �������δ�õ���ȷ��ʼ�������ߴ�ǩ���㷨���������ṩ���������ݡ�protected int engineSign(byte[] outbuf, int offset, int len) throws SignatureException
offset
��ʼ���õ���ǩ���ֽڱ������ṩ�Ļ����� outbuf
�С�ǩ���ĸ�ʽȡ���ڻ���ǩ��������
��ǩ��ʵ�ֽ����������õ����ʼ״̬�������е�һ�� engineInitSign
��������֮��������״̬�������ҿ�������ʹ�ø�ǩ��ʵ�֣���ͬһ��˽Կ���ɽ�����ǩ����
�˷���Ӧ��һ�������������ڶ����Ƽ����Կ��ǣ��������������巽��������ṩ��Ӧ��д�˷�����
outbuf
- ���ǩ������Ļ�������offset
- ���洢ǩ���� outbuf
��ƫ������len
- outbuf
�з����ǩ�����ֽ�������Ĭ��ʵ�ֺ� SUN �ṩ���Ȳ����ز���ժҪ������˲�����ֵС��ʵ��ǩ�����ȣ��˷������׳�һ�� SignatureException�������ֵ���ڻ����ʵ��ǩ�����ȣ����Դ˲�����
outbuf
�е��ֽ���
SignatureException
- �������δ�õ���ȷ��ʼ�������ߴ�ǩ���㷨���������ṩ���������ݣ����� len
С��ʵ��ǩ�����ȡ�protected abstract boolean engineVerify(byte[] sigBytes) throws SignatureException
sigBytes
- Ҫ��֤��ǩ���ֽڡ�
SignatureException
- �������δ�õ���ȷ��ʼ���������ǩ��δ����ȷ��������ʹ����ߴ�ǩ���㷨���������ṩ���������ݵȵȡ�protected boolean engineVerify(byte[] sigBytes, int offset, int length) throws SignatureException
ע������Ӧ��д��Ĭ��ʵ�֡�
sigBytes
- Ҫ��֤��ǩ���ֽڡ�offset
- byte ��������ʼ����ƫ������length
- Ҫʹ�õ��ֽ�������ƫ������ʼ�����㣩��
SignatureException
- �������δ�õ���ȷ��ʼ���������ǩ��δ����ȷ��������ʹ����ߴ�ǩ���㷨���������ṩ���������ݵȵȡ�@Deprecated protected abstract void engineSetParameter(String param, Object value) throws InvalidParameterException
engineSetParameter
ȡ����
param
- �������ַ�����ʾ����value
- ����ֵ��
InvalidParameterException
- ��� param
�Ǵ��㷨�������Ч�����������Ѿ����ò������Ҳ����������ã����߷����˰�ȫ�쳣�ȵȡ�protected void engineSetParameter(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException
�˷��������ṩ����д���Ա�ʹ��ָ���IJ������ó�ʼ����ǩ�����档
params
- ����
UnsupportedOperationException
- ����ṩ��δ��д�˷���
InvalidAlgorithmParameterException
- ����ṩ��δ��д�˷�������ָ���IJ������ʺϴ�ǩ������protected AlgorithmParameters engineGetParameters()
�˷��������ṩ����д���Է������ǩ���������ʹ�õIJ����������ǩ������δʹ���κβ������� null��
���صIJ���������������ʼ����ǩ������IJ�����ͬ�������ǩ��������Ҫ�㷨������ȴδʹ���κβ������г�ʼ�����صIJ������ܻ�����ɵײ�ǩ��ʵ��ʹ�õ�Ĭ�Ϻ�������ɵIJ���ֵ����ϡ�
UnsupportedOperationException
- ����ṩ��δ��д�˷���@Deprecated protected abstract Object engineGetParameter(String param) throws InvalidParameterException
param
- �������ַ������ơ�
InvalidParameterException
- ��� param
�Ǵ��������Ч���������߳��Ի�ȡ�˲���ʱ�����������쳣��public Object clone() throws CloneNotSupportedException
Object
�е� clone
CloneNotSupportedException
- �������һ����֧�� Cloneable
��ʵ�֡�Cloneable
|
JavaTM Platform Standard Ed. 6 |
|||||||||
��һ���� ��һ���� | ��� ��� ������ | |||||||||
ժҪ�� Ƕ�� | �ֶ� | ���췽�� | ���� | ��ϸ��Ϣ�� �ֶ� | ���췽�� | ���� |
��Ȩ���� 2007 Sun Microsystems, Inc. ��������Ȩ���� ����������֤��������������ĵ����·ַ�������