com.mindbright.jce.crypto
Class Mac
java.lang.Object
com.mindbright.jce.crypto.Mac
- All Implemented Interfaces:
- java.lang.Cloneable
public class Mac
- extends java.lang.Object
- implements java.lang.Cloneable
Constructor Summary |
protected |
Mac(MacSpi macSpi,
Provider provider,
java.lang.String algorithm)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Mac
protected Mac(MacSpi macSpi,
Provider provider,
java.lang.String algorithm)
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Overrides:
clone
in class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException
doFinal
public final byte[] doFinal()
throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException
doFinal
public final byte[] doFinal(byte[] input)
throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException
doFinal
public final void doFinal(byte[] output,
int outOffset)
throws ShortBufferException,
java.lang.IllegalStateException
- Throws:
ShortBufferException
java.lang.IllegalStateException
getAlgorithm
public final java.lang.String getAlgorithm()
getInstance
public static final Mac getInstance(java.lang.String algorithm)
throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
getInstance
public static final Mac getInstance(java.lang.String algorithm,
java.lang.String provider)
throws NoSuchProviderException,
NoSuchAlgorithmException
- Throws:
NoSuchProviderException
NoSuchAlgorithmException
getMacLength
public final int getMacLength()
init
public final void init(Key key)
throws InvalidKeyException
- Throws:
InvalidKeyException
init
public final void init(Key key,
AlgorithmParameterSpec params)
throws InvalidKeyException,
InvalidAlgorithmParameterException
- Throws:
InvalidKeyException
InvalidAlgorithmParameterException
reset
public final void reset()
update
public final void update(byte input)
throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException
update
public final void update(byte[] input)
throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException
update
public final void update(byte[] input,
int offset,
int len)
throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException