Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/javax/crypto/interfaces/PBEKey#constants) \| [Inherited Constants](https://developer.android.com/reference/javax/crypto/interfaces/PBEKey#inhconstants) \| [Methods](https://developer.android.com/reference/javax/crypto/interfaces/PBEKey#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/javax/crypto/interfaces/PBEKey#inhmethods)

# PBEKey


`
public


interface
PBEKey
`


`


implements

https://developer.android.com/reference/javax/crypto/SecretKey


`

|---|
| javax.crypto.interfaces.PBEKey |

<br />

*** ** * ** ***

The interface to a PBE key.
**See also:**

- `https://developer.android.com/reference/javax/crypto/spec/PBEKeySpec`
- `https://developer.android.com/reference/javax/crypto/SecretKey`

## Summary

| ### Constants ||
|---|---|
| `long` | `https://developer.android.com/reference/javax/crypto/interfaces/PBEKey#serialVersionUID` The class fingerprint that is set to indicate serialization compatibility since J2SE 1.4. |

| ### Inherited constants |
|---|
| From interface `https://developer.android.com/reference/javax/crypto/SecretKey` |---|---| | `long` | `https://developer.android.com/reference/javax/crypto/SecretKey#serialVersionUID` The class fingerprint that is set to indicate serialization compatibility since J2SE 1.4. | |
| From interface `https://developer.android.com/reference/java/security/Key` |---|---| | `long` | `https://developer.android.com/reference/java/security/Key#serialVersionUID` *This constant was deprecated in API level 34. A `serialVersionUID` field in an interface is ineffectual. Do not use; no replacement.* | |

| ### Public methods ||
|---|---|
| ` abstract int` | ` https://developer.android.com/reference/javax/crypto/interfaces/PBEKey#getIterationCount()() ` Returns the iteration count or 0 if not specified. |
| ` abstract char[]` | ` https://developer.android.com/reference/javax/crypto/interfaces/PBEKey#getPassword()() ` Returns the password. |
| ` abstract byte[]` | ` https://developer.android.com/reference/javax/crypto/interfaces/PBEKey#getSalt()() ` Returns the salt or null if not specified. |

| ### Inherited methods |
|---|---|
| From interface ` https://developer.android.com/reference/javax/security/auth/Destroyable ` |---|---| | ` default void` | ` https://developer.android.com/reference/javax/security/auth/Destroyable#destroy()() ` Destroy this `Object`. | | ` default boolean` | ` https://developer.android.com/reference/javax/security/auth/Destroyable#isDestroyed()() ` Determine if this `Object` has been destroyed. | ||
| From interface ` https://developer.android.com/reference/java/security/Key ` |---|---| | ` abstract https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/security/Key#getAlgorithm()() ` Returns the standard algorithm name for this key. | | ` abstract byte[]` | ` https://developer.android.com/reference/java/security/Key#getEncoded()() ` Returns the key in its primary encoding format, or null if this key does not support encoding. | | ` abstract https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/security/Key#getFormat()() ` Returns the name of the primary encoding format of this key, or null if this key does not support encoding. | ||

## Constants

### serialVersionUID

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

```
public static final long serialVersionUID
```

The class fingerprint that is set to indicate serialization
compatibility since J2SE 1.4.

<br />

Constant Value:

-1430015993304333921
(0xec279007d7f7c19f)


## Public methods

### getIterationCount

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

```
public abstract int getIterationCount ()
```

Returns the iteration count or 0 if not specified.

<br />

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

### getPassword

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

```
public abstract char[] getPassword ()
```

Returns the password.

Note: this method should return a copy of the password. It is
the caller's responsibility to zero out the password information after
it is no longer needed.

<br />

| Returns ||
|---|---|
| `char[]` | the password. <br /> |

### getSalt

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

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

Returns the salt or null if not specified.

Note: this method should return a copy of the salt. It is
the caller's responsibility to zero out the salt information after
it is no longer needed.

<br />

| Returns ||
|---|---|
| `byte[]` | the salt. <br /> |