< prev index next >

src/java.base/share/classes/javax/crypto/interfaces/PBEKey.java

Print this page




  25 
  26 package javax.crypto.interfaces;
  27 
  28 import java.math.BigInteger;
  29 
  30 /**
  31  * The interface to a PBE key.
  32  *
  33  * @author Valerie Peng
  34  *
  35  * @see javax.crypto.spec.PBEKeySpec
  36  * @see javax.crypto.SecretKey
  37  * @since 1.4
  38  */
  39 public interface PBEKey extends javax.crypto.SecretKey {
  40 
  41     /**
  42      * The class fingerprint that is set to indicate serialization
  43      * compatibility since J2SE 1.4.
  44      */

  45     static final long serialVersionUID = -1430015993304333921L;
  46 
  47     /**
  48      * Returns the password.
  49      *
  50      * <p> Note: this method should return a copy of the password. It is
  51      * the caller's responsibility to zero out the password information after
  52      * it is no longer needed.
  53      *
  54      * @return the password.
  55      */
  56     char[] getPassword();
  57 
  58     /**
  59      * Returns the salt or null if not specified.
  60      *
  61      * <p> Note: this method should return a copy of the salt. It is
  62      * the caller's responsibility to zero out the salt information after
  63      * it is no longer needed.
  64      *


  25 
  26 package javax.crypto.interfaces;
  27 
  28 import java.math.BigInteger;
  29 
  30 /**
  31  * The interface to a PBE key.
  32  *
  33  * @author Valerie Peng
  34  *
  35  * @see javax.crypto.spec.PBEKeySpec
  36  * @see javax.crypto.SecretKey
  37  * @since 1.4
  38  */
  39 public interface PBEKey extends javax.crypto.SecretKey {
  40 
  41     /**
  42      * The class fingerprint that is set to indicate serialization
  43      * compatibility since J2SE 1.4.
  44      */
  45     @SuppressWarnings("serial") // serialVersionUID in an interface is ineffectual
  46     static final long serialVersionUID = -1430015993304333921L;
  47 
  48     /**
  49      * Returns the password.
  50      *
  51      * <p> Note: this method should return a copy of the password. It is
  52      * the caller's responsibility to zero out the password information after
  53      * it is no longer needed.
  54      *
  55      * @return the password.
  56      */
  57     char[] getPassword();
  58 
  59     /**
  60      * Returns the salt or null if not specified.
  61      *
  62      * <p> Note: this method should return a copy of the salt. It is
  63      * the caller's responsibility to zero out the salt information after
  64      * it is no longer needed.
  65      *
< prev index next >