Stay organized with collections
Save and categorize content based on your preferences.
NextBytes
class NextBytes : SecureRandomParameters
DRBG parameters for random bits generation. It is used in SecureRandom.nextBytes(byte[], SecureRandomParameters)
.
Summary
Public methods |
ByteArray! |
Returns the requested additional input.
|
Boolean |
Returns whether prediction resistance is requested.
|
Int |
Returns the security strength requested in bits.
|
Public methods
fun getAdditionalInput(): ByteArray!
Returns the requested additional input.
Return |
ByteArray! |
the requested additional input, null if not requested. A new byte array is returned each time this method is called. |
getPredictionResistance
fun getPredictionResistance(): Boolean
Returns whether prediction resistance is requested.
Return |
Boolean |
whether prediction resistance is requested |
getStrength
fun getStrength(): Int
Returns the security strength requested in bits.
Return |
Int |
the strength requested, or -1 if the effective strength should be used. |
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# DrbgParameters.NextBytes\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nNextBytes\n=========\n\n```\nclass NextBytes : SecureRandomParameters\n```\n\n|---|---------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [java.security.DrbgParameters.NextBytes](#) |\n\nDRBG parameters for random bits generation. It is used in [SecureRandom.nextBytes(byte[], SecureRandomParameters)](/reference/kotlin/java/security/SecureRandom#nextBytes(kotlin.ByteArray,%20java.security.SecureRandomParameters)).\n\nSummary\n-------\n\n| Public methods ||\n|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|\n| [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)! | [getAdditionalInput](#getAdditionalInput())`()` Returns the requested additional input. |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [getPredictionResistance](#getPredictionResistance())`()` Returns whether prediction resistance is requested. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getStrength](#getStrength())`()` Returns the security strength requested in bits. |\n\nPublic methods\n--------------\n\n### getAdditionalInput\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getAdditionalInput(): ByteArray!\n```\n\nReturns the requested additional input.\n\n| Return ||\n|------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|\n| [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)! | the requested additional input, `null` if not requested. A new byte array is returned each time this method is called. |\n\n### getPredictionResistance\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getPredictionResistance(): Boolean\n```\n\nReturns whether prediction resistance is requested.\n\n| Return ||\n|------------------------------------------------------------------------------------|--------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | whether prediction resistance is requested |\n\n### getStrength\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getStrength(): Int\n```\n\nReturns the security strength requested in bits.\n\n| Return ||\n|----------------------------------------------------------------------------|-------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the strength requested, or -1 if the effective strength should be used. |"]]