de.flexiprovider.core.camellia
Class CamelliaKey

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

public class CamelliaKey
extends java.lang.Object
implements SecretKey

This class is used for opaquely storing Camellia keys.

Author:
Ralf-Philipp Weinmann
See Also:
Serialized Form

Fields inherited from interface java.security.Key
serialVersionUID
 
Constructor Summary
protected CamelliaKey(byte[] keyBytes)
          Construct new instance of CamelliaKey from an array of key bytes.
 
Method Summary
 boolean equals(java.lang.Object other)
          Tests if the argument contains the same key material as this
 java.lang.String getAlgorithm()
          Obtain the name of the algorithm this key can be used for.
 byte[] getEncoded()
           
 java.lang.String getFormat()
          This method will return the format of the key as a String.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CamelliaKey

protected CamelliaKey(byte[] keyBytes)
Construct new instance of CamelliaKey from an array of key bytes.
Parameters:
keyBytes - the key bytes
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
Obtain the name of the algorithm this key can be used for.
Specified by:
getAlgorithm in interface java.security.Key
Returns:
name of the algorithm the key can be used for as a String

getFormat

public java.lang.String getFormat()
This method will return the format of the key as a String.
Specified by:
getFormat in interface java.security.Key
Returns:
format of the stored key as a String.

getEncoded

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

equals

public boolean equals(java.lang.Object other)
Tests if the argument contains the same key material as this
Overrides:
equals in class java.lang.Object
Parameters:
other - comparing key material
Returns:
true if the keys are equal

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
the hash code of this key