Stay organized with collections
Save and categorize content based on your preferences.
DSAGenParameterSpec
class DSAGenParameterSpec : AlgorithmParameterSpec
This immutable class specifies the set of parameters used for generating DSA parameters as specified in FIPS 186-3 Digital Signature Standard (DSS).
Summary
Public constructors |
Creates a domain parameter specification for DSA parameter generation using primePLen and subprimeQLen .
|
Creates a domain parameter specification for DSA parameter generation using primePLen , subprimeQLen , and seedLen .
|
Public methods |
Int |
Returns the desired length of the prime P of the to-be-generated DSA domain parameters in bits.
|
Int |
Returns the desired length of the domain parameter seed in bits.
|
Int |
Returns the desired length of the sub-prime Q of the to-be-generated DSA domain parameters in bits.
|
Public constructors
DSAGenParameterSpec
DSAGenParameterSpec(
primePLen: Int,
subprimeQLen: Int)
Creates a domain parameter specification for DSA parameter generation using primePLen
and subprimeQLen
. The value of subprimeQLen
is also used as the default length of the domain parameter seed in bits.
Parameters |
primePLen |
Int: the desired length of the prime P in bits. |
subprimeQLen |
Int: the desired length of the sub-prime Q in bits. |
Exceptions |
java.lang.IllegalArgumentException |
if primePLen or subprimeQLen is illegal per the specification of FIPS 186-3. |
DSAGenParameterSpec
DSAGenParameterSpec(
primePLen: Int,
subprimeQLen: Int,
seedLen: Int)
Creates a domain parameter specification for DSA parameter generation using primePLen
, subprimeQLen
, and seedLen
.
Parameters |
primePLen |
Int: the desired length of the prime P in bits. |
subprimeQLen |
Int: the desired length of the sub-prime Q in bits. |
seedLen |
Int: the desired length of the domain parameter seed in bits, shall be equal to or greater than subprimeQLen . |
Exceptions |
java.lang.IllegalArgumentException |
if primePLenLen , subprimeQLen , or seedLen is illegal per the specification of FIPS 186-3. |
Public methods
getPrimePLength
fun getPrimePLength(): Int
Returns the desired length of the prime P of the to-be-generated DSA domain parameters in bits.
Return |
Int |
the length of the prime P. |
getSeedLength
fun getSeedLength(): Int
Returns the desired length of the domain parameter seed in bits.
Return |
Int |
the length of the domain parameter seed. |
getSubprimeQLength
fun getSubprimeQLength(): Int
Returns the desired length of the sub-prime Q of the to-be-generated DSA domain parameters in bits.
Return |
Int |
the length of the sub-prime Q. |
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,["# DSAGenParameterSpec\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nDSAGenParameterSpec\n===================\n\n```\nclass DSAGenParameterSpec : AlgorithmParameterSpec\n```\n\n|---|---------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [java.security.spec.DSAGenParameterSpec](#) |\n\nThis immutable class specifies the set of parameters used for generating DSA parameters as specified in [FIPS 186-3 Digital Signature Standard (DSS)](http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf).\n\nSummary\n-------\n\n| Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [DSAGenParameterSpec](#DSAGenParameterSpec(kotlin.Int,%20kotlin.Int))`(`primePLen:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `subprimeQLen:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Creates a domain parameter specification for DSA parameter generation using `primePLen` and `subprimeQLen`. |\n| [DSAGenParameterSpec](#DSAGenParameterSpec(kotlin.Int,%20kotlin.Int,%20kotlin.Int))`(`primePLen:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `subprimeQLen:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `seedLen:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Creates a domain parameter specification for DSA parameter generation using `primePLen`, `subprimeQLen`, and `seedLen`. |\n\n| Public methods ||\n|----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getPrimePLength](#getPrimePLength())`()` Returns the desired length of the prime P of the to-be-generated DSA domain parameters in bits. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getSeedLength](#getSeedLength())`()` Returns the desired length of the domain parameter seed in bits. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getSubprimeQLength](#getSubprimeQLength())`()` Returns the desired length of the sub-prime Q of the to-be-generated DSA domain parameters in bits. |\n\nPublic constructors\n-------------------\n\n### DSAGenParameterSpec\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nDSAGenParameterSpec(\n primePLen: Int, \n subprimeQLen: Int)\n```\n\nCreates a domain parameter specification for DSA parameter generation using `primePLen` and `subprimeQLen`. The value of `subprimeQLen` is also used as the default length of the domain parameter seed in bits.\n\n| Parameters ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------|\n| `primePLen` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the desired length of the prime P in bits. |\n| `subprimeQLen` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the desired length of the sub-prime Q in bits. |\n\n| Exceptions ||\n|--------------------------------------|----------------------------------------------------------------------------------|\n| `java.lang.IllegalArgumentException` | if `primePLen` or `subprimeQLen` is illegal per the specification of FIPS 186-3. |\n\n### DSAGenParameterSpec\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nDSAGenParameterSpec(\n primePLen: Int, \n subprimeQLen: Int, \n seedLen: Int)\n```\n\nCreates a domain parameter specification for DSA parameter generation using `primePLen`, `subprimeQLen`, and `seedLen`.\n\n| Parameters ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `primePLen` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the desired length of the prime P in bits. |\n| `subprimeQLen` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the desired length of the sub-prime Q in bits. |\n| `seedLen` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the desired length of the domain parameter seed in bits, shall be equal to or greater than `subprimeQLen`. |\n\n| Exceptions ||\n|--------------------------------------|-------------------------------------------------------------------------------------------------|\n| `java.lang.IllegalArgumentException` | if `primePLenLen`, `subprimeQLen`, or `seedLen` is illegal per the specification of FIPS 186-3. |\n\nPublic methods\n--------------\n\n### getPrimePLength\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getPrimePLength(): Int\n```\n\nReturns the desired length of the prime P of the to-be-generated DSA domain parameters in bits.\n\n| Return ||\n|----------------------------------------------------------------------------|----------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the length of the prime P. |\n\n### getSeedLength\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getSeedLength(): Int\n```\n\nReturns the desired length of the domain parameter seed in bits.\n\n| Return ||\n|----------------------------------------------------------------------------|------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the length of the domain parameter seed. |\n\n### getSubprimeQLength\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getSubprimeQLength(): Int\n```\n\nReturns the desired length of the sub-prime Q of the to-be-generated DSA domain parameters in bits.\n\n| Return ||\n|----------------------------------------------------------------------------|--------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the length of the sub-prime Q. |"]]