de.flexiprovider.core.mac
Class CMacKey

java.lang.Object
  |
  +--de.flexiprovider.core.mac.CMacKey
All Implemented Interfaces:
java.security.Key, Key, SecretKey, javax.crypto.SecretKey, java.io.Serializable

public class CMacKey
extends java.lang.Object
implements SecretKey

This class implements a key for the CMAC-algorithm.

Author:
Paul Nguentcheu
See Also:
Serialized Form

Fields inherited from interface java.security.Key
serialVersionUID
 
Constructor Summary
protected CMacKey(byte[] keyBytes)
          Constructor of a CMacKey
 
Method Summary
 java.lang.String getAlgorithm()
          Return the name of the algorithm.
 byte[] getEncoded()
           
 java.lang.String getFormat()
          Returns the format of the key (RAW)
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMacKey

protected CMacKey(byte[] keyBytes)
Constructor of a CMacKey
Parameters:
keyBytes - the key bytes
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
Return the name of the algorithm.
Specified by:
getAlgorithm in interface java.security.Key
Returns:
"Cmac"

getEncoded

public byte[] getEncoded()
Specified by:
getEncoded in interface java.security.Key
Returns:
a copy of the key bytes

getFormat

public java.lang.String getFormat()
Returns the format of the key (RAW)
Specified by:
getFormat in interface java.security.Key
Returns:
the format of the key (RAW)