Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/javax/crypto/spec/PBEParameterSpec#pubctors) \| [Methods](https://developer.android.com/reference/javax/crypto/spec/PBEParameterSpec#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/javax/crypto/spec/PBEParameterSpec#inhmethods)

# PBEParameterSpec

` public class PBEParameterSpec `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/java/security/spec/AlgorithmParameterSpec `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | javax.crypto.spec.PBEParameterSpec |

<br />

*** ** * ** ***

This class specifies the set of parameters used with password-based encryption (PBE), as defined in the [PKCS #5](http://www.ietf.org/rfc/rfc2898.txt) standard.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/javax/crypto/spec/PBEParameterSpec#PBEParameterSpec(byte[],%20int)(byte[] salt, int iterationCount) ` Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard. |
| ` https://developer.android.com/reference/javax/crypto/spec/PBEParameterSpec#PBEParameterSpec(byte[],%20int,%20java.security.spec.AlgorithmParameterSpec)(byte[] salt, int iterationCount, https://developer.android.com/reference/java/security/spec/AlgorithmParameterSpec paramSpec) ` Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard. |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/javax/crypto/spec/PBEParameterSpec#getIterationCount()() ` Returns the iteration count. |
| ` https://developer.android.com/reference/java/security/spec/AlgorithmParameterSpec` | ` https://developer.android.com/reference/javax/crypto/spec/PBEParameterSpec#getParameterSpec()() ` Returns the cipher algorithm parameter specification. |
| ` byte[]` | ` https://developer.android.com/reference/javax/crypto/spec/PBEParameterSpec#getSalt()() ` Returns the salt. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### PBEParameterSpec

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PBEParameterSpec (byte[] salt, 
                int iterationCount)
```

Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard.

<br />

| Parameters ||
|---|---|
| `salt` | `byte`: the salt. The contents of `salt` are copied to protect against subsequent modification. <br /> |
| `iterationCount` | `int`: the iteration count. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/NullPointerException` | if `salt` is null. |

### PBEParameterSpec

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PBEParameterSpec (byte[] salt, 
                int iterationCount, 
                AlgorithmParameterSpec paramSpec)
```

Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard.

<br />

| Parameters ||
|---|---|
| `salt` | `byte`: the salt. The contents of `salt` are copied to protect against subsequent modification. <br /> |
| `iterationCount` | `int`: the iteration count. <br /> |
| `paramSpec` | `AlgorithmParameterSpec`: the cipher algorithm parameter specification, which may be null. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/NullPointerException` | if `salt` is null. |

## Public methods

### getIterationCount

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getIterationCount ()
```

Returns the iteration count.

<br />

| Returns ||
|---|---|
| `int` | the iteration count <br /> |

### getParameterSpec

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AlgorithmParameterSpec getParameterSpec ()
```

Returns the cipher algorithm parameter specification.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/security/spec/AlgorithmParameterSpec` | the parameter specification, or null if none was set. <br /> |

### getSalt

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public byte[] getSalt ()
```

Returns the salt.

<br />

| Returns ||
|---|---|
| `byte[]` | the salt. Returns a new array each time this method is called. <br /> |