de.flexiprovider.core.pbe
Class PBEKey

java.lang.Object
  |
  +--de.flexiprovider.core.pbe.PBEKey
All Implemented Interfaces:
java.security.Key, Key, SecretKey, javax.crypto.SecretKey, java.io.Serializable

public class PBEKey
extends java.lang.Object
implements SecretKey

A simple class representing a key for PBE (Passphrase Based Encryption).

Author:
Thomas Wahrenbruch
See Also:
Serialized Form

Fields inherited from interface java.security.Key
serialVersionUID
 
Constructor Summary
protected PBEKey(char[] keyChars)
          Construct a new PBEKey with the specified chars.
 
Method Summary
 java.lang.String getAlgorithm()
          Returns the name of the algorithm the key is used with.
 byte[] getEncoded()
           
 java.lang.String getFormat()
          Return the encoding format of the key.
 char[] getKey()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PBEKey

protected PBEKey(char[] keyChars)
Construct a new PBEKey with the specified chars.
Parameters:
keyChars - the key chars
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
Returns the name of the algorithm the key is used with.
Specified by:
getAlgorithm in interface java.security.Key
Returns:
"PBE"

getEncoded

public byte[] getEncoded()
Specified by:
getEncoded in interface java.security.Key
Returns:
the key chars converted into a byte array

getFormat

public java.lang.String getFormat()
Return the encoding format of the key.
Specified by:
getFormat in interface java.security.Key
Returns:
"RAW-BMP"

getKey

public char[] getKey()
Returns:
a copy of the key chars