APIdia Launch Partner
Top Inners Constructors Methods
sun.security.util

public final Class PBEUtil

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, .CharBuffer, java.nio.charset.StandardCharsets, java.security.AlgorithmParameters, .InvalidAlgorithmParameterException, .InvalidKeyException, .Key, .NoSuchAlgorithmException, .Provider, .SecureRandom, java.security.spec.AlgorithmParameterSpec, .InvalidParameterSpecException, java.util.Arrays, javax.crypto.Cipher, .SecretKey, javax.crypto.spec.IvParameterSpec, .PBEKeySpec, .PBEParameterSpec

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static char[]
decodePassword(byte[] passwdBytes)

public static byte[]
encodePassword(char[] passwd)

public static PBEKeySpec
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PBEUtilback to summary
public PBEUtil()

Method Detail

decodePasswordback to summary
private static char[] decodePassword(byte[] passwdBytes)
encodePasswordback to summary
public static byte[] encodePassword(char[] passwd)
getPBAKeySpecback to summary
public static PBEKeySpec getPBAKeySpec(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException
sun.security.util back to summary

public final Class PBEUtil.PBES2Params

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private int
private IvParameterSpec
private byte[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static byte[]
check(byte[] salt)

private static int
check(int iCount)

public AlgorithmParameters
getAlgorithmParameters(int blkSize, String pbeAlgo, Provider algParamsProv, SecureRandom random)

public IvParameterSpec
public static AlgorithmParameterSpec
public PBEKeySpec
getPBEKeySpec(int blkSize, int keyLength, int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)

public void
initialize(int blkSize, int opmode, int iCount, byte[] salt, AlgorithmParameterSpec ivSpec, SecureRandom random)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_ITERATIONSback to summary
private static final int DEFAULT_ITERATIONS
DEFAULT_SALT_LENGTHback to summary
private static final int DEFAULT_SALT_LENGTH
iCountback to summary
private int iCount
ivSpecback to summary
private IvParameterSpec ivSpec
saltback to summary
private byte[] salt

Constructor Detail

PBES2Paramsback to summary
public PBES2Params()

Method Detail

checkback to summary
private static byte[] check(byte[] salt) throws InvalidAlgorithmParameterException
checkback to summary
private static int check(int iCount) throws InvalidAlgorithmParameterException
getAlgorithmParametersback to summary
public AlgorithmParameters getAlgorithmParameters(int blkSize, String pbeAlgo, Provider algParamsProv, SecureRandom random)
getIvSpecback to summary
public IvParameterSpec getIvSpec()
getParameterSpecback to summary
public static AlgorithmParameterSpec getParameterSpec(AlgorithmParameters params) throws InvalidAlgorithmParameterException
getPBEKeySpecback to summary
public PBEKeySpec getPBEKeySpec(int blkSize, int keyLength, int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException
initializeback to summary
public void initialize(int blkSize, int opmode, int iCount, byte[] salt, AlgorithmParameterSpec ivSpec, SecureRandom random) throws InvalidAlgorithmParameterException