org.pre4j.crypto.impl
Class CBCSecretKey

java.lang.Object
  extended by org.pre4j.crypto.impl.CBCSecretKey
All Implemented Interfaces:
java.io.Serializable, java.security.Key, javax.crypto.SecretKey

public class CBCSecretKey
extends java.lang.Object
implements javax.crypto.SecretKey

Author:
gieretmk TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
See Also:
Serialized Form

Constructor Summary
CBCSecretKey(javax.crypto.SecretKey key)
           
CBCSecretKey(javax.crypto.SecretKey key, byte[] iv)
           
 
Method Summary
 byte[] doExport()
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAlgorithm()
           
 byte[] getEncoded()
           
 java.lang.String getFormat()
           
 byte[] getIv()
           
 int hashCode()
           
 void setIv(byte[] iv)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CBCSecretKey

public CBCSecretKey(javax.crypto.SecretKey key)

CBCSecretKey

public CBCSecretKey(javax.crypto.SecretKey key,
                    byte[] iv)
Method Detail

doExport

public byte[] doExport()
Returns:

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

getAlgorithm

public java.lang.String getAlgorithm()
Specified by:
getAlgorithm in interface java.security.Key
Returns:

getEncoded

public byte[] getEncoded()
Specified by:
getEncoded in interface java.security.Key

getFormat

public java.lang.String getFormat()
Specified by:
getFormat in interface java.security.Key
Returns:

getIv

public byte[] getIv()
Returns:
Returns the iv.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

setIv

public void setIv(byte[] iv)
Parameters:
iv - The iv to set.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object