Bees v0.5.0 API

bees.core.security
Class Mac

java.lang.Object
  |
  +--bees.core.security.Mac

public class Mac
extends java.lang.Object

Mac is a thin veneer over the standard javax.crypto.Mac class that uses bees.core.security classes.


Field Summary
static Permission MAC_PERMISSION
          Permission to use this key for decryption.
 
Constructor Summary
Mac(java.lang.String algorithm)
           
 
Method Summary
 byte[] doFinal()
           
 byte[] doFinal(byte[] input)
           
 void doFinal(byte[] output, int outputOffset)
           
 java.lang.String getAlgorithm()
           
 int getMacLength()
           
 void init(KeySpec key)
           
 void init(KeySpec key, java.security.spec.AlgorithmParameterSpec params)
           
 void reset()
           
 java.lang.String toString()
           
 void update(byte input)
           
 void update(byte[] input)
           
 void update(byte[] input, int inputOffset, int inputLen)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAC_PERMISSION

public static final Permission MAC_PERMISSION
Permission to use this key for decryption.
Constructor Detail

Mac

public Mac(java.lang.String algorithm)
    throws java.security.NoSuchAlgorithmException
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()

getMacLength

public int getMacLength()

init

public void init(KeySpec key)
          throws java.security.InvalidKeyException

init

public void init(KeySpec key,
                 java.security.spec.AlgorithmParameterSpec params)
          throws java.security.InvalidAlgorithmParameterException,
                 java.security.InvalidKeyException

update

public void update(byte input)
            throws java.lang.IllegalStateException

update

public void update(byte[] input)
            throws java.lang.IllegalStateException

update

public void update(byte[] input,
                   int inputOffset,
                   int inputLen)
            throws java.lang.IllegalStateException

doFinal

public byte[] doFinal()
               throws java.lang.IllegalStateException

doFinal

public void doFinal(byte[] output,
                    int outputOffset)
             throws java.lang.IllegalStateException,
                    javax.crypto.ShortBufferException

doFinal

public byte[] doFinal(byte[] input)
               throws java.lang.IllegalStateException,
                      javax.crypto.IllegalBlockSizeException,
                      javax.crypto.BadPaddingException

reset

public void reset()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Bees v0.5.0 API

This documentation is Copyright (C) 2002 The University of Utah. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for Bees v0.5.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/