# IkeSessionParams.IkeAuthPskConfig

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

# IkeAuthPskConfig

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionParams.IkeAuthPskConfig "View this page in Java")  

```
class IkeAuthPskConfig : IkeSessionParams.IkeAuthConfig
```

|---|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                        |||
| ↳ | [android.net.ipsec.ike.IkeSessionParams.IkeAuthConfig](https://developer.android.com/reference/kotlin/android/net/ipsec/ike/IkeSessionParams.IkeAuthConfig)           ||
|   | ↳ | [android.net.ipsec.ike.IkeSessionParams.IkeAuthPskConfig](https://developer.android.com/reference/kotlin/android/net/ipsec/ike/IkeSessionParams.IkeAuthPskConfig#) |

This class represents the configuration to support IKEv2 pre-shared-key-based authentication of local or remote side.

## Summary

|                                                                                                                                                          Public methods                                                                                                                                                           ||
|---------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)      | [equals](https://developer.android.com/reference/kotlin/android/net/ipsec/ike/IkeSessionParams.IkeAuthPskConfig#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` <br /> |
| open[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html) | [getPsk](https://developer.android.com/reference/kotlin/android/net/ipsec/ike/IkeSessionParams.IkeAuthPskConfig#getPsk())`()` Retrieves the pre-shared key                                                                           |
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)              | [hashCode](https://developer.android.com/reference/kotlin/android/net/ipsec/ike/IkeSessionParams.IkeAuthPskConfig#hashCode())`()` <br />                                                                                             |

## Public methods

### equals

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

```
open fun equals(other: Any?): Boolean
```

|                     Parameters                     ||
|-------|---------------------------------------------|
| `obj` | the reference object with which to compare. |

|                                                                           Return                                                                           ||
|------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true`if this object is the same as the obj argument;`false`otherwise. |

### getPsk

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

```
open fun getPsk(): ByteArray
```

Retrieves the pre-shared key

|                                                        Return                                                        ||
|-----------------------------------------------------------------------------------------|-----------------------------|
| [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html) | This value cannot be`null`. |

### hashCode

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

```
open fun hashCode(): Int
```

|                                                     Return                                                     ||
|----------------------------------------------------------------------------|------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |