javax.crypto.spec

Class PBEParameterSpec

  • java.lang.Object
    • javax.crypto.spec.PBEParameterSpec
  • All Implemented Interfaces:
    java.security.spec.AlgorithmParameterSpec


    public class PBEParameterSpec
    extends java.lang.Object
    implements java.security.spec.AlgorithmParameterSpec
    This class specifies the set of parameters used with password-based encryption (PBE), as defined in the PKCS #5 standard.
    Since:
    1.4
    Version:
    1.16, 06/03/04
    Author:
    Jan Luehe
    • Constructor Summary

      Constructors 
      Constructor and Description
      PBEParameterSpec(byte[] salt, int iterationCount)
      Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard.
      PBEParameterSpec(byte[] salt, int iterationCount, java.security.spec.AlgorithmParameterSpec paramSpec)
      Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getIterationCount()
      Returns the iteration count.
      java.security.spec.AlgorithmParameterSpec getParameterSpec()
      Returns the cipher algorithm parameter specification.
      byte[] getSalt()
      Returns the salt.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PBEParameterSpec

        public PBEParameterSpec(byte[] salt,
                                int iterationCount)
        Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard.
        Parameters:
        salt - the salt. The contents of salt are copied to protect against subsequent modification.
        iterationCount - the iteration count.
        Throws:
        java.lang.NullPointerException - if salt is null.
      • PBEParameterSpec

        public PBEParameterSpec(byte[] salt,
                                int iterationCount,
                                java.security.spec.AlgorithmParameterSpec paramSpec)
        Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard.
        Parameters:
        salt - the salt. The contents of salt are copied to protect against subsequent modification.
        iterationCount - the iteration count.
        paramSpec - the cipher algorithm parameter specification, which may be null.
        Throws:
        java.lang.NullPointerException - if salt is null.
        Since:
        1.8
    • Method Detail

      • getSalt

        public byte[] getSalt()
        Returns the salt.
        Returns:
        the salt. Returns a new array each time this method is called.
      • getIterationCount

        public int getIterationCount()
        Returns the iteration count.
        Returns:
        the iteration count
      • getParameterSpec

        public java.security.spec.AlgorithmParameterSpec getParameterSpec()
        Returns the cipher algorithm parameter specification.
        Returns:
        the parameter specification, or null if none was set.
        Since:
        1.8

© Portions Copyright 2003, 2023 IBM Corporation. All rights reserved.
© Portions Copyright 2003, 2023 Oracle and/or its affiliates. All rights reserved.