IT. Expert System.

Android Reference

PBEKeySpec


javax.crypto.spec

Class PBEKeySpec

  • All Implemented Interfaces:
    KeySpec


    public class PBEKeySpec
    extends Object
    implements KeySpec
    The key specification for a password based encryption key.

    Password based encryption is described in PKCS #5.

    • Constructor Summary

      Constructors
      Constructor and Description
      PBEKeySpec(char[] password)
      Creates a new PBEKeySpec with the specified password.
      PBEKeySpec(char[] password, byte[] salt, int iterationCount)
      Creates a new PBEKeySpec with the specified password, salt and iteration count.
      PBEKeySpec(char[] password, byte[] salt, int iterationCount, int keyLength)
      Creates a new PBEKeySpec with the specified password, salt, iteration count and the desired length of the derived key.
    • Constructor Detail

      • PBEKeySpec

        public PBEKeySpec(char[] password)
        Creates a new PBEKeySpec with the specified password.
        Parameters:
        password - the password.
      • PBEKeySpec

        public PBEKeySpec(char[] password,
                  byte[] salt,
                  int iterationCount,
                  int keyLength)
        Creates a new PBEKeySpec with the specified password, salt, iteration count and the desired length of the derived key.
        Parameters:
        password - the password.
        salt - the salt.
        iterationCount - the iteration count.
        keyLength - the desired key length of the derived key,
        Throws:
        NullPointerException - if the salt is null.
        IllegalArgumentException - if the salt is empty, iteration count is zero or negative or the key length is zero or negative.
      • PBEKeySpec

        public PBEKeySpec(char[] password,
                  byte[] salt,
                  int iterationCount)
        Creates a new PBEKeySpec with the specified password, salt and iteration count.
        Parameters:
        password - the password.
        salt - the salt.
        iterationCount - the iteration count.
        Throws:
        NullPointerException - if salt is null.
        IllegalArgumentException - if the salt is empty or iteration count is zero or negative.
    • Method Detail

      • clearPassword

        public final void clearPassword()
        Clears the password by overwriting it.
      • getPassword

        public final char[] getPassword()
        Returns a copy of the password of this key specification.
        Returns:
        a copy of the password of this key specification.
        Throws:
        IllegalStateException - if the password has been cleared before.
      • getSalt

        public final byte[] getSalt()
        Returns a copy of the salt of this key specification.
        Returns:
        a copy of the salt of this key specification or null if none is specified.
      • getIterationCount

        public final int getIterationCount()
        Returns the iteration count of this key specification.
        Returns:
        the iteration count of this key specification.
      • getKeyLength

        public final int getKeyLength()
        Returns the desired key length of the derived key.
        Returns:
        the desired key length of the derived key.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 585 / 158670813. Delta: 0.02879 с