de.flexiprovider.core.misty1
Class Misty1Key
java.lang.Object
|
+--de.flexiprovider.core.misty1.Misty1Key
- All Implemented Interfaces:
- java.security.Key, Key, SecretKey, javax.crypto.SecretKey, java.io.Serializable
- public class Misty1Key
- extends java.lang.Object
- implements SecretKey
Misty-1 Key is used to store a symmetric key for Misty-1
encryption/decryption.
- Author:
- Paul Nguentcheu
- See Also:
- Serialized Form
| Fields inherited from interface java.security.Key |
serialVersionUID |
|
Constructor Summary |
protected |
Misty1Key(byte[] keyBytes)
Constructs a new Misty1 key from the given 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()
Return the name of the algorithm the key is used with. |
byte[] |
getEncoded()
|
java.lang.String |
getFormat()
Returns the name of the primary encoding format of this key, which is
actually RAW (array of bytes) |
int |
hashCode()
|
| Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Misty1Key
protected Misty1Key(byte[] keyBytes)
- Constructs a new Misty1 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 with.
- Specified by:
getAlgorithm in interface java.security.Key
- Returns:
- "Misty1"
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 name of the primary encoding format of this key, which is
actually RAW (array of bytes)
- 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 - another object- 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