Top Inners Fields
org.bouncycastle.jcajce.provider.symmetric.util

public Interface PBE

Known Direct Implementers
org.bouncycastle.jcajce.provider.symmetric.util.PBESecretKeyFactory, org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher, org.bouncycastle.jcajce.provider.symmetric.util.BaseMac, org.bouncycastle.jcajce.provider.symmetric.util.BaseSecretKeyFactory, org.bouncycastle.jcajce.provider.symmetric.util.BaseStreamCipher, org.bouncycastle.jcajce.provider.symmetric.util.BaseWrapCipher
Imports
java.security.InvalidAlgorithmParameterException, java.security.spec.AlgorithmParameterSpec, javax.crypto.SecretKey, javax.crypto.spec.PBEKeySpec, .PBEParameterSpec, org.bouncycastle.crypto.CipherParameters, .CryptoServicePurpose, .PBEParametersGenerator, org.bouncycastle.crypto.digests.GOST3411Digest, .MD2Digest, .RIPEMD160Digest, .SM3Digest, .TigerDigest, org.bouncycastle.crypto.generators.OpenSSLPBEParametersGenerator, .PKCS12ParametersGenerator, .PKCS5S1ParametersGenerator, .PKCS5S2ParametersGenerator, org.bouncycastle.crypto.params.DESParameters, .KeyParameter, .ParametersWithIV, org.bouncycastle.crypto.util.DigestFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
PBE.Util

uses the appropriate mixer to generate the key and IV if necessary.

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int

Field Detail

GOST3411back to summary
public static final int GOST3411
MD2back to summary
public static final int MD2
MD5back to summary
public static final int MD5
OPENSSLback to summary
public static final int OPENSSL
PKCS12back to summary
public static final int PKCS12
PKCS5S1back to summary
public static final int PKCS5S1
PKCS5S1_UTF8back to summary
public static final int PKCS5S1_UTF8
PKCS5S2back to summary
public static final int PKCS5S2
PKCS5S2_UTF8back to summary
public static final int PKCS5S2_UTF8
RIPEMD160back to summary
public static final int RIPEMD160
SHA1back to summary
public static final int SHA1
SHA224back to summary
public static final int SHA224
SHA256back to summary
public static final int SHA256
SHA384back to summary
public static final int SHA384
SHA3_224back to summary
public static final int SHA3_224
SHA3_256back to summary
public static final int SHA3_256
SHA3_384back to summary
public static final int SHA3_384
SHA3_512back to summary
public static final int SHA3_512
SHA512back to summary
public static final int SHA512
SM3back to summary
public static final int SM3
TIGERback to summary
public static final int TIGER
org.bouncycastle.jcajce.provider.symmetric.util back to summary

public Class PBE.Util

extends Object
Class Inheritance

uses the appropriate mixer to generate the key and IV if necessary.

Constructor Summary

AccessConstructor and Description
public
Util()

Method Summary

Modifier and TypeMethod and Description
private static byte[]
convertPassword(int type, PBEKeySpec keySpec)

private static PBEParametersGenerator
makePBEGenerator(int type, int hash)

public static CipherParameters
makePBEMacParameters(BCPBEKey pbeKey, AlgorithmParameterSpec spec)

generate a PBE based key suitable for a MAC algorithm, the key size is chosen according the MAC size, or the hashing algorithm, whichever is greater.

public static CipherParameters
makePBEMacParameters(PBEKeySpec keySpec, int type, int hash, int keySize)

generate a PBE based key suitable for a MAC algorithm, the key size is chosen according the MAC size, or the hashing algorithm, whichever is greater.

public static CipherParameters
makePBEMacParameters(SecretKey key, int type, int hash, int keySize, PBEParameterSpec pbeSpec)

generate a PBE based key suitable for a MAC algorithm, the key size is chosen according the MAC size, or the hashing algorithm, whichever is greater.

public static CipherParameters
makePBEParameters(byte[] pbeKey, int scheme, int digest, int keySize, int ivSize, AlgorithmParameterSpec spec, String targetAlgorithm)

construct a key and iv (if necessary) suitable for use with a Cipher.

public static CipherParameters
makePBEParameters(BCPBEKey pbeKey, AlgorithmParameterSpec spec, String targetAlgorithm)

construct a key and iv (if necessary) suitable for use with a Cipher.

public static CipherParameters
makePBEParameters(PBEKeySpec keySpec, int type, int hash, int keySize, int ivSize)

construct a key and iv (if necessary) suitable for use with a Cipher.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Utilback to summary
public Util()

Method Detail

convertPasswordback to summary
private static byte[] convertPassword(int type, PBEKeySpec keySpec)
makePBEGeneratorback to summary
private static PBEParametersGenerator makePBEGenerator(int type, int hash)
makePBEMacParametersback to summary
public static CipherParameters makePBEMacParameters(BCPBEKey pbeKey, AlgorithmParameterSpec spec)

generate a PBE based key suitable for a MAC algorithm, the key size is chosen according the MAC size, or the hashing algorithm, whichever is greater.

makePBEMacParametersback to summary
public static CipherParameters makePBEMacParameters(PBEKeySpec keySpec, int type, int hash, int keySize)

generate a PBE based key suitable for a MAC algorithm, the key size is chosen according the MAC size, or the hashing algorithm, whichever is greater.

makePBEMacParametersback to summary
public static CipherParameters makePBEMacParameters(SecretKey key, int type, int hash, int keySize, PBEParameterSpec pbeSpec)

generate a PBE based key suitable for a MAC algorithm, the key size is chosen according the MAC size, or the hashing algorithm, whichever is greater.

makePBEParametersback to summary
public static CipherParameters makePBEParameters(byte[] pbeKey, int scheme, int digest, int keySize, int ivSize, AlgorithmParameterSpec spec, String targetAlgorithm) throws InvalidAlgorithmParameterException

construct a key and iv (if necessary) suitable for use with a Cipher.

makePBEParametersback to summary
public static CipherParameters makePBEParameters(BCPBEKey pbeKey, AlgorithmParameterSpec spec, String targetAlgorithm)

construct a key and iv (if necessary) suitable for use with a Cipher.

makePBEParametersback to summary
public static CipherParameters makePBEParameters(PBEKeySpec keySpec, int type, int hash, int keySize, int ivSize)

construct a key and iv (if necessary) suitable for use with a Cipher.