FileDocCategorySizeDatePackage
CMSPBEKey.javaAPI DocBouncy Castle Crypto API 1.41 (Java 1.5)1648Wed Oct 01 10:55:28 BST 2008org.bouncycastle.cms

CMSPBEKey

public abstract class CMSPBEKey extends Object implements PBEKey

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

        this.password = password;
        this.salt = salt;
        this.iterationCount = iterationCount;
    
public CMSPBEKey(char[] password, PBEParameterSpec pbeSpec)

        this(password, pbeSpec.getSalt(), pbeSpec.getIterationCount());
    
Methods Summary
public java.lang.StringgetAlgorithm()

        return "PKCS5S2";
    
abstract byte[]getEncoded(java.lang.String algorithmOid)

public byte[]getEncoded()

        return null;
    
public java.lang.StringgetFormat()

        return "RAW";
    
public intgetIterationCount()

        return iterationCount;
    
protected static javax.crypto.spec.PBEParameterSpecgetParamSpec(java.security.AlgorithmParameters algParams)

        try
        {
            return algParams.getParameterSpec(PBEParameterSpec.class);
        }
        catch (InvalidParameterSpecException e)
        {
            throw new InvalidAlgorithmParameterException("cannot process PBE spec: " + e.getMessage());
        }
    
public char[]getPassword()

        return password;
    
public byte[]getSalt()

        return salt;