Class BCPBEKey
java.lang.Object
org.bouncycastle.jcajce.provider.symmetric.util.BCPBEKey
- All Implemented Interfaces:
Serializable,Key,PBEKey,SecretKey
public class BCPBEKey extends Object implements PBEKey
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from interface javax.crypto.interfaces.PBEKey
serialVersionUID -
Constructor Summary
Constructors Constructor Description BCPBEKey(String algorithm, ASN1ObjectIdentifier oid, int type, int digest, int keySize, int ivSize, PBEKeySpec pbeKeySpec, CipherParameters param) -
Method Summary
Modifier and Type Method Description StringgetAlgorithm()Returns the name of the algorithm of this key.byte[]getEncoded()Returns the encoded form of this key, ornullif encoding is not supported by this key.StringgetFormat()Returns the name of the format used to encode this key, ornullif it can not be encoded.intgetIterationCount()Returns the iteration count, 0 if not specified.intgetIvSize()ASN1ObjectIdentifiergetOID()CipherParametersgetParam()char[]getPassword()Returns a copy to the password.byte[]getSalt()Returns a copy of the salt data or null if not specified.voidsetTryWrongPKCS12Zero(boolean tryWrong)
-
Constructor Details
-
BCPBEKey
public BCPBEKey(String algorithm, ASN1ObjectIdentifier oid, int type, int digest, int keySize, int ivSize, PBEKeySpec pbeKeySpec, CipherParameters param)- Parameters:
param-
-
-
Method Details
-
getAlgorithm
Description copied from interface:KeyReturns the name of the algorithm of this key. If the algorithm is unknown,nullis returned.- Specified by:
getAlgorithmin interfaceKey- Returns:
- the name of the algorithm of this key or
nullif the algorithm is unknown.
-
getFormat
Description copied from interface:KeyReturns the name of the format used to encode this key, ornullif it can not be encoded. -
getEncoded
public byte[] getEncoded()Description copied from interface:KeyReturns the encoded form of this key, ornullif encoding is not supported by this key.- Specified by:
getEncodedin interfaceKey- Returns:
- the encoded form of this key, or
nullif encoding is not supported by this key.
-
getIvSize
public int getIvSize() -
getParam
-
getPassword
public char[] getPassword()Description copied from interface:PBEKeyReturns a copy to the password.- Specified by:
getPasswordin interfacePBEKey- Returns:
- a copy to the password.
-
getSalt
public byte[] getSalt()Description copied from interface:PBEKeyReturns a copy of the salt data or null if not specified. -
getIterationCount
public int getIterationCount()Description copied from interface:PBEKeyReturns the iteration count, 0 if not specified.- Specified by:
getIterationCountin interfacePBEKey- Returns:
- the iteration count, 0 if not specified.
-
getOID
-
setTryWrongPKCS12Zero
public void setTryWrongPKCS12Zero(boolean tryWrong)
-