public class DESedeKey
extends java.lang.Object
implements javax.crypto.SecretKey
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 |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAlgorithm() |
byte[] |
getEncoded() |
java.lang.String |
getFormat() |
int |
hashCode()
Calculates a hash code value for the object.
|
void |
zeroize()
This function zeroizes the key so that it isn't in memory
|
public DESedeKey(byte[] key) throws java.security.InvalidKeyException
key
- the given keyjava.security.InvalidKeyException
- if the given key has a wrong sizepublic DESedeKey(byte[] key, int offset) throws java.security.InvalidKeyException
key
, beginning at
offset
, as the DES-EDE keykey
- the buffer with the DES-EDE keyoffset
- the offset in key
, where the DES-EDE key
startsjava.security.InvalidKeyException
- if the given key has a wrong sizepublic byte[] getEncoded()
getEncoded
in interface java.security.Key
public java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
public java.lang.String getFormat()
getFormat
in interface java.security.Key
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void zeroize()
© Portions Copyright 2003, 2012 IBM Corporation. All rights reserved.
© Portions Copyright 2003, 2012, Oracle and/or its affiliates. All rights reserved.