de.flexiprovider.core.desede
Class DESedeKey
java.lang.Object
|
+--de.flexiprovider.core.desede.DESedeKey
- All Implemented Interfaces:
- java.security.Key, Key, SecretKey, javax.crypto.SecretKey, java.io.Serializable
- public class DESedeKey
- extends java.lang.Object
- implements SecretKey
DESedeKey is used to store a symmetric Key for DESede Encryption/Decryption.
- Author:
- Norbert Trummel , Sylvain Franke
- See Also:
- Serialized Form
| Fields inherited from interface java.security.Key |
serialVersionUID |
|
Constructor Summary |
protected |
DESedeKey(byte[] keyBytes)
Construct a new key from the given key bytes. |
|
Method Summary |
boolean |
equals(java.lang.Object other)
Compare the given object with this key |
java.lang.String |
getAlgorithm()
Return the name of the algorithm the key is used for. |
byte[] |
getEncoded()
|
java.lang.String |
getFormat()
Return the encoding format of the key. |
int |
hashCode()
|
| Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
DESedeKey
protected DESedeKey(byte[] keyBytes)
- Construct a new key from the given key bytes.
- Parameters:
keyBytes - the key bytes
getAlgorithm
public java.lang.String getAlgorithm()
- Return the name of the algorithm the key is used for.
- Specified by:
getAlgorithm in interface java.security.Key
- Returns:
DESede.algName
getEncoded
public byte[] getEncoded()
- Specified by:
getEncoded in interface java.security.Key
- Returns:
- the encoded key (a copy of the key bytes)
getFormat
public java.lang.String getFormat()
- Return the encoding format of the key.
- Specified by:
getFormat in interface java.security.Key
- Returns:
- "RAW"
equals
public boolean equals(java.lang.Object other)
- Compare the given object with this key
- Overrides:
equals in class java.lang.Object
- Parameters:
other - other object- Returns:
- the result of the comparison
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
- Returns:
- the hash code of this key