Stay organized with collections Save and categorize content based on your preferences.
PBEParameterSpec
open class PBEParameterSpec : AlgorithmParameterSpec
This class specifies the set of parameters used with password-based encryption (PBE), as defined in the PKCS #5 standard.
Summary
Public constructors |
Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard. |
Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard. |
Public constructors
PBEParameterSpec
PBEParameterSpec(
salt: ByteArray!,
iterationCount: Int)
Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard.
Parameters |
salt | ByteArray!: the salt. The contents of salt are copied to protect against subsequent modification. |
iterationCount | Int: the iteration count. |
Exceptions |
java.lang.NullPointerException | if salt is null. |
PBEParameterSpec
PBEParameterSpec(
salt: ByteArray!,
iterationCount: Int,
paramSpec: AlgorithmParameterSpec!)
Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard.
Parameters |
salt | ByteArray!: the salt. The contents of salt are copied to protect against subsequent modification. |
iterationCount | Int: the iteration count. |
paramSpec | AlgorithmParameterSpec!: the cipher algorithm parameter specification, which may be null. |
Exceptions |
java.lang.NullPointerException | if salt is null. |
Public methods
getIterationCount
open fun getIterationCount(): Int
Returns the iteration count.
Return |
Int | the iteration count |
getParameterSpec
open fun getParameterSpec(): AlgorithmParameterSpec!
Returns the cipher algorithm parameter specification.
getSalt
open fun getSalt(): ByteArray!
Returns the salt.
Return |
ByteArray! | the salt. Returns a new array each time this method is called. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# PBEParameterSpec\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nPBEParameterSpec\n================\n\n```\nopen class PBEParameterSpec : AlgorithmParameterSpec\n```\n\n|---|-----------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [javax.crypto.spec.PBEParameterSpec](#) |\n\nThis 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.\n\nSummary\n-------\n\n| Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [PBEParameterSpec](#PBEParameterSpec(kotlin.ByteArray,%20kotlin.Int))`(`salt:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!`, `iterationCount:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard. |\n| [PBEParameterSpec](#PBEParameterSpec(kotlin.ByteArray,%20kotlin.Int,%20java.security.spec.AlgorithmParameterSpec))`(`salt:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!`, `iterationCount:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `paramSpec:` `[AlgorithmParameterSpec](../../../java/security/spec/AlgorithmParameterSpec.html#)!`)` Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard. |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getIterationCount](#getIterationCount())`()` Returns the iteration count. |\n| open [AlgorithmParameterSpec](../../../java/security/spec/AlgorithmParameterSpec.html#)! | [getParameterSpec](#getParameterSpec())`()` Returns the cipher algorithm parameter specification. |\n| open [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)! | [getSalt](#getSalt())`()` Returns the salt. |\n\nPublic constructors\n-------------------\n\n### PBEParameterSpec\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nPBEParameterSpec(\n salt: ByteArray!, \n iterationCount: Int)\n```\n\nConstructs a parameter set for password-based encryption as defined in the PKCS #5 standard.\n\n| Parameters ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `salt` | [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!: the salt. The contents of `salt` are copied to protect against subsequent modification. |\n| `iterationCount` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the iteration count. |\n\n| Exceptions ||\n|----------------------------------|--------------------|\n| `java.lang.NullPointerException` | if `salt` is null. |\n\n### PBEParameterSpec\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nPBEParameterSpec(\n salt: ByteArray!, \n iterationCount: Int, \n paramSpec: AlgorithmParameterSpec!)\n```\n\nConstructs a parameter set for password-based encryption as defined in the PKCS #5 standard.\n\n| Parameters ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `salt` | [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!: the salt. The contents of `salt` are copied to protect against subsequent modification. |\n| `iterationCount` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the iteration count. |\n| `paramSpec` | [AlgorithmParameterSpec](../../../java/security/spec/AlgorithmParameterSpec.html#)!: the cipher algorithm parameter specification, which may be null. |\n\n| Exceptions ||\n|----------------------------------|--------------------|\n| `java.lang.NullPointerException` | if `salt` is null. |\n\nPublic methods\n--------------\n\n### getIterationCount\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getIterationCount(): Int\n```\n\nReturns the iteration count.\n\n| Return ||\n|----------------------------------------------------------------------------|---------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the iteration count |\n\n### getParameterSpec\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getParameterSpec(): AlgorithmParameterSpec!\n```\n\nReturns the cipher algorithm parameter specification.\n\n| Return ||\n|-------------------------------------------------------------------------------------|-------------------------------------------------------|\n| [AlgorithmParameterSpec](../../../java/security/spec/AlgorithmParameterSpec.html#)! | the parameter specification, or null if none was set. |\n\n### getSalt\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getSalt(): ByteArray!\n```\n\nReturns the salt.\n\n| Return ||\n|------------------------------------------------------------------------------------------|----------------------------------------------------------------|\n| [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)! | the salt. Returns a new array each time this method is called. |"]]