FileDocCategorySizeDatePackage
PKCS5Scheme2PBEKey.javaAPI DocBouncy Castle Crypto API 1.41 (Java 1.5)1209Wed Oct 01 10:55:30 BST 2008org.bouncycastle.cms

PKCS5Scheme2PBEKey

public class PKCS5Scheme2PBEKey extends CMSPBEKey
PKCS5 scheme-2 - password converted to bytes assuming ASCII.

Fields Summary
Constructors Summary
public PKCS5Scheme2PBEKey(char[] password, byte[] salt, int iterationCount)

        super(password, salt, iterationCount);
    
public PKCS5Scheme2PBEKey(char[] password, AlgorithmParameters pbeParams)

        super(password, getParamSpec(pbeParams));
    
Methods Summary
byte[]getEncoded(java.lang.String algorithmOid)

        PKCS5S2ParametersGenerator gen = new PKCS5S2ParametersGenerator();

        gen.init(PBEParametersGenerator.PKCS5PasswordToBytes(this.getPassword()), this.getSalt(), this.getIterationCount());

        return ((KeyParameter)gen.generateDerivedParameters(CMSEnvelopedHelper.INSTANCE.getKeySize(algorithmOid))).getKey();