FileDocCategorySizeDatePackage
PBEParameterSpec.javaAPI DocAndroid 1.5 API2430Wed May 06 22:41:02 BST 2009javax.crypto.spec

PBEParameterSpec

public class PBEParameterSpec extends Object implements AlgorithmParameterSpec
The algorithm parameter specification for a password based encryption algorithm.

Password based encryption is described in PKCS #5.

since
Android 1.0

Fields Summary
private final byte[]
salt
private final int
iterationCount
Constructors Summary
public PBEParameterSpec(byte[] salt, int iterationCount)
Creates a new PBEParameterSpec with the specified salt and iteration count.

param
salt the salt.
param
iterationCount the iteration count.
throws
NullPointerException if salt is null.

        if (salt == null) {
            throw new NullPointerException(Messages.getString("crypto.3B")); //$NON-NLS-1$
        }
        this.salt = new byte[salt.length];
        System.arraycopy(salt, 0, this.salt, 0, salt.length);
        this.iterationCount = iterationCount;
    
Methods Summary
public intgetIterationCount()
Returns the iteration count.

return
the iteration count.

        return iterationCount;
    
public byte[]getSalt()
Returns a copy to the salt.

return
a copy to the salt.

        byte[] result = new byte[salt.length];
        System.arraycopy(salt, 0, result, 0, salt.length);
        return result;