com.mindbright.jce.crypto.spec
Class SecretKeySpec

java.lang.Object
  extended by com.mindbright.jce.crypto.spec.SecretKeySpec
All Implemented Interfaces:
Key, KeySpec, SecretKey, java.io.Serializable

public class SecretKeySpec
extends java.lang.Object
implements KeySpec, SecretKey

See Also:
Serialized Form

Constructor Summary
SecretKeySpec(byte[] key, int offset, int len, java.lang.String algorithm)
           
SecretKeySpec(byte[] key, java.lang.String algorithm)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAlgorithm()
          Get the algorithm name
 byte[] getEncoded()
          Get the key in its encoded form
 java.lang.String getFormat()
          Get the primary encoding format of this key.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecretKeySpec

public SecretKeySpec(byte[] key,
                     int offset,
                     int len,
                     java.lang.String algorithm)

SecretKeySpec

public SecretKeySpec(byte[] key,
                     java.lang.String algorithm)
Method Detail

equals

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

getAlgorithm

public java.lang.String getAlgorithm()
Description copied from interface: Key
Get the algorithm name

Specified by:
getAlgorithm in interface Key
Returns:
the name of the algorithm this key supports

getEncoded

public byte[] getEncoded()
Description copied from interface: Key
Get the key in its encoded form

Specified by:
getEncoded in interface Key
Returns:
the key in its encoded form

getFormat

public java.lang.String getFormat()
Description copied from interface: Key
Get the primary encoding format of this key.

Specified by:
getFormat in interface Key
Returns:
the primary encoding format of the key

hashCode

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