| java.lang.Object | |
| ↳ | javax.crypto.spec.SecretKeySpec | 
A key specification for a SecretKey and also a secret key
 implementation that is provider-independent. It can be used for raw secret
 keys that can be specified as byte[].
| 
  [Expand]
   Inherited Constants  | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
   From interface
java.security.Key
 | |||||||||||
   From interface
javax.crypto.SecretKey
 | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new  
  
  SecretKeySpec for the specified key data and
 algorithm name. | |||||||||||
Creates a new  
  
  SecretKeySpec for the key data from the
 specified buffer key starting at offset with
 length len and the specified algorithm name. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Compares the specified object with this  
  
  SecretKeySpec
 instance. | |||||||||||
Returns the algorithm name. 
  
   | |||||||||||
Returns the encoded form of this secret key. 
  
   | |||||||||||
Returns the name of the format used to encode the key. 
  
   | |||||||||||
Returns the hash code of this  
  
  SecretKeySpec object. | |||||||||||
| 
  [Expand]
   Inherited Methods  | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
   
From class
  java.lang.Object
 | |||||||||||
   
From interface
  java.security.Key
 | |||||||||||
Creates a new SecretKeySpec for the specified key data and
 algorithm name.
| key | the key data. | 
|---|---|
| algorithm | the algorithm name. | 
| IllegalArgumentException | if the key data or the algorithm name is null or if the key data is empty. | 
|---|
Creates a new SecretKeySpec for the key data from the
 specified buffer key starting at offset with
 length len and the specified algorithm name.
| key | the key data. | 
|---|---|
| offset | the offset. | 
| len | the size of the key data. | 
| algorithm | the algorithm name. | 
| IllegalArgumentException | if the key data or the algorithm name is null, the key data
             is empty or offset and len do not
             specify a valid chunk in the buffer key. | 
        
|---|---|
| ArrayIndexOutOfBoundsException | if offset or len is negative.
 | 
        
Compares the specified object with this SecretKeySpec
 instance.
| obj | the object to compare. | 
|---|
Returns the algorithm name.
Returns the encoded form of this secret key.
Returns the name of the format used to encode the key.
Returns the hash code of this SecretKeySpec object.