JavaTM Platform
Standard Ed. 6

javax.crypto
�� MacSpi

java.lang.Object
  �̳��� javax.crypto.MacSpi

public abstract class MacSpi
extends Object

����Ϊ Mac �ඨ�������ṩ�߽ӿ� (SPI)�� �����е����г��󷽷���������ÿ��ϣ���ṩʵ���ض� MAC �㷨�ļ��ܷ����ṩ��ʵ�֡�

��ʵ�ֿ�������ʵ�� Cloneable �ӿڡ�

�����°汾��ʼ��
1.4

���췽��ժҪ
MacSpi()
           
 
����ժҪ
 Object clone()
          �����ʵ�ֿ��Ը��ƣ��򷵻�һ��������
protected abstract  byte[] engineDoFinal()
          ��� MAC ���㲢���������� MAC �Ա��һ��ʹ�ã�ά�� MAC ��ʼ�����õ�������Կ��
protected abstract  int engineGetMacLength()
          �������ֽ�Ϊ��λ�� MAC �ij��ȡ�
protected abstract  void engineInit(Key key, AlgorithmParameterSpec params)
          �ø����ģ����ܣ���Կ���㷨������ʼ�� MAC��
protected abstract  void engineReset()
          Ϊ�˽�һ��ʹ�ö��������� MAC��ά�� MAC ��ʼ�����õ�������Կ��
protected abstract  void engineUpdate(byte input)
          �����������ֽڡ�
protected abstract  void engineUpdate(byte[] input, int offset, int len)
          �� offset ��ʼ���������������� input �е�ǰlen ���ֽڡ�
protected  void engineUpdate(ByteBuffer input)
          �� input.position() ��ʼ�������� ByteBuffer input �е� input.remaining() �ֽڡ�
 
���� java.lang.Object �̳еķ���
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

���췽����ϸ��Ϣ

MacSpi

public MacSpi()
������ϸ��Ϣ

engineGetMacLength

protected abstract int engineGetMacLength()
�������ֽ�Ϊ��λ�� MAC �ij��ȡ�

���أ�
���ֽ�Ϊ��λ�� MAC ���ȡ�

engineInit

protected abstract void engineInit(Key key,
                                   AlgorithmParameterSpec params)
                            throws InvalidKeyException,
                                   InvalidAlgorithmParameterException
�ø����ģ����ܣ���Կ���㷨������ʼ�� MAC��

������
key - �����ܣ���Կ��
params - �㷨������
�׳���
InvalidKeyException - ���������Կ���ʺϳ�ʼ���� MAC��
InvalidAlgorithmParameterException - ��������㷨�������ʺϴ� MAC��

engineUpdate

protected abstract void engineUpdate(byte input)
�����������ֽڡ�

������
input - Ҫ�����������ֽڡ�

engineUpdate

protected abstract void engineUpdate(byte[] input,
                                     int offset,
                                     int len)
�� offset ��ʼ���������������� input �е�ǰlen ���ֽڡ�

������
input - ���뻺������
offset - input �����뿪ʼ����ƫ������
len - Ҫ�������ֽ�����

engineUpdate

protected void engineUpdate(ByteBuffer input)
�� input.position() ��ʼ�������� ByteBuffer input �е� input.remaining() �ֽڡ� ����ʱ����������λ�ý����������ƣ������Ʋ�δ�ı䡣

����ܹ���byte�������Ч�ش��� ByteBuffer������Ӧ������д�˷�����

������
input - ByteBuffer
�����°汾��ʼ��
1.5

engineDoFinal

protected abstract byte[] engineDoFinal()
��� MAC ���㲢���������� MAC �Ա��һ��ʹ�ã�ά�� MAC ��ʼ�����õ�������Կ��

���أ�
MAC �Ľ����

engineReset

protected abstract void engineReset()
Ϊ�˽�һ��ʹ�ö��������� MAC��ά�� MAC ��ʼ�����õ�������Կ��


clone

public Object clone()
             throws CloneNotSupportedException
�����ʵ�ֿ��Ը��ƣ��򷵻�һ��������

���ǣ�
�� Object �е� clone
���أ�
�����ʵ�ֿ��Ը��ƣ��򷵻�һ��������
�׳���
CloneNotSupportedException - �������һ����֧�� Cloneable ��ʵ�֡�
������
Cloneable

JavaTM Platform
Standard Ed. 6

�ύ��������
�йظ���� API �ο����ϺͿ�����Ա�ĵ�������� Java SE ������Ա�ĵ������ĵ���������ϸ�ġ����򿪷���Ա���������Լ�������������ﶨ�塢ʹ�ü��ɺ͹�������ʾ����

��Ȩ���� 2007 Sun Microsystems, Inc. ��������Ȩ���� ����������֤��������������ĵ����·ַ�������