com.ibm.crypto.fips.provider
Class DESedeKey
- java.lang.Object
com.ibm.crypto.fips.provider.DESedeKey
All implemented interfaces:
java.io.Serializable, java.security.Key, javax.crypto.SecretKey
- public class DESedeKey
- extends java.lang.Object
- implements javax.crypto.SecretKey
See Also:
Constructor Summary
Constructor and Description |
---|
DESedeKey(byte[] key)
Creates a DES-EDE key from a given key.
|
DESedeKey(byte[] key,int offset)
Uses the first 24 bytes in
key , beginning at
offset , as the DES-EDE key
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
equals(java.lang.Object obj)
|
|
finalize()
This function zeroizes the key so that it isn't in memory when GC is done.
|
|
getAlgorithm()
|
|
getEncoded()
|
|
getFormat()
|
|
hashCode()
Calculates a hash code value for the object.
|
|
zeroize()
This function zeroizes the key so that it isn't in memory
|
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
DESedeKey
- public DESedeKey(byte[] key)
- throws java.security.InvalidKeyException
Creates a DES-EDE key from a given key.
Parameters:
key
- the given key Throws:
java.security.InvalidKeyException
- if the given key has a wrong size DESedeKey
- public DESedeKey(byte[] key,
- int offset)
- throws java.security.InvalidKeyException
Uses the first 24 bytes in
key
, beginning at
offset
, as the DES-EDE key
Parameters:
key
- the buffer with the DES-EDE key offset
- the offset in key
, where the DES-EDE key
starts Throws:
java.security.InvalidKeyException
- if the given key has a wrong size Method Detail
getEncoded
- public byte[] getEncoded()
Specified by:
getEncoded
in interface java.security.Key
getAlgorithm
- public java.lang.String getAlgorithm( )
Specified by:
getAlgorithm
in interface java.security.Key
getFormat
- public java.lang.String getFormat( )
Specified by:
getFormat
in interface java.security.Key
hashCode
- public int hashCode()
Calculates a hash code value for the object.
Objects that are equal will also have the same hashcode.
Overrides:
hashCode
in class java.lang.Object
equals
- public boolean equals(java.lang.Object obj)
Overrides:
equals
in class java.lang.Object
zeroize
- public void zeroize()
This function zeroizes the key so that it isn't in memory
finalize
- protected void finalize()
This function zeroizes the key so that it isn't in memory when GC is done.
Overrides:
finalize
in class java.lang.Object