de.flexiprovider.core.idea
Class IDEAKey

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

public class IDEAKey
extends java.lang.Object
implements SecretKey

IDEAKey is used to store a symmetric Key for IDEA Encryption/Decryption.

Author:
Ralph Kuhnert, Anders Adamson
See Also:
Serialized Form

Fields inherited from interface java.security.Key
serialVersionUID
 
Constructor Summary
protected IDEAKey(byte[] keyBytes)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object other)
          Tests if the argument contains the same key material as this
 java.lang.String getAlgorithm()
          returns the algorithm for this key.
 byte[] getEncoded()
           
 java.lang.String getFormat()
          returns the format for this key.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IDEAKey

protected IDEAKey(byte[] keyBytes)
Constructor. Copy the key bytes.
Parameters:
keyBytes - the key bytes
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
returns the algorithm for this key.
Specified by:
getAlgorithm in interface java.security.Key
Returns:
the string "IDEA"

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 for this key.
Specified by:
getFormat in interface java.security.Key
Returns:
the string "RAW"

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