Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Enums](https://developer.android.com/reference/java/security/DrbgParameters.Capability#enumconstants) \| [Methods](https://developer.android.com/reference/java/security/DrbgParameters.Capability#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/java/security/DrbgParameters.Capability#inhmethods)

# DrbgParameters.Capability


`
public
static
final

enum
DrbgParameters.Capability
`


`


`

`

extends https://developer.android.com/reference/java/lang/Enum<https://developer.android.com/reference/java/security/DrbgParameters.Capability>


`

`


`

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [java.lang.Enum](https://developer.android.com/reference/java/lang/Enum)\<[java.security.DrbgParameters.Capability](https://developer.android.com/reference/java/security/DrbgParameters.Capability)\> ||
|   | ↳ | java.security.DrbgParameters.Capability |

<br />

*** ** * ** ***

The reseedable and prediction resistance capabilities of a DRBG.


When this object is passed to a `SecureRandom.getInstance()` call,
it is the requested minimum capability. When it's returned from
`SecureRandom.getParameters()`, it is the effective capability.


Please note that while the `Instantiate_function` defined in
NIST SP 800-90Ar1 only includes a `prediction_resistance_flag`
parameter, the `Capability` type includes an extra value
`https://developer.android.com/reference/java/security/DrbgParameters.Capability#RESEED_ONLY` because reseeding is an optional function.
If `NONE` is used in an `Instantiation` object in calling the
`SecureRandom.getInstance` method, the returned DRBG instance
is not guaranteed to support reseeding. If `RESEED_ONLY` or
`PR_AND_RESEED` is used, the instance must support reseeding.


The table below lists possible effective values if a certain
capability is requested, i.e.
>
> ```
> Capability requested = ...;
> SecureRandom s = SecureRandom.getInstance("DRBG",
>         DrbgParameters(-1, requested, null));
> Capability effective = ((DrbgParametes.Initiate) s.getParameters())
>         .getCapability();
> ```

| Requested Value | Possible Effective Values |
| NONE | NONE, RESEED_ONLY, PR_AND_RESEED |
| RESEED_ONLY | RESEED_ONLY, PR_AND_RESEED |
| PR_AND_RESEED | PR_AND_RESEED |
|---|---|
[requested and effective capabilities]


A DRBG implementation supporting prediction resistance must also
support reseeding.

## Summary

| ### Enum values ||
|---|---|
| `https://developer.android.com/reference/java/security/DrbgParameters.Capability` | `NONE` Neither prediction resistance nor reseed. |
| `https://developer.android.com/reference/java/security/DrbgParameters.Capability` | `PR_AND_RESEED` Both prediction resistance and reseed. |
| `https://developer.android.com/reference/java/security/DrbgParameters.Capability` | `RESEED_ONLY` Reseed but no prediction resistance. |

| ### Public methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/java/security/DrbgParameters.Capability#supportsPredictionResistance()() ` Returns whether this capability supports prediction resistance. |
| ` boolean` | ` https://developer.android.com/reference/java/security/DrbgParameters.Capability#supportsReseeding()() ` Returns whether this capability supports reseeding. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/security/DrbgParameters.Capability#toString()() ` Returns the name of this enum constant, as contained in the declaration. |
| ` static https://developer.android.com/reference/java/security/DrbgParameters.Capability` | ` https://developer.android.com/reference/java/security/DrbgParameters.Capability#valueOf(java.lang.String)(https://developer.android.com/reference/java/lang/String name) ` |
| ` static final https://developer.android.com/reference/java/security/DrbgParameters.Capability` | ` https://developer.android.com/reference/java/security/DrbgParameters.Capability#values()() ` |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Enum

` `


final

https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Enum#clone()()
`

Throws CloneNotSupportedException.


`


final

int` `
https://developer.android.com/reference/java/lang/Enum#compareTo(E)(https://developer.android.com/reference/java/security/DrbgParameters.Capability o)
`

Compares this enum with the specified object for order.


`


final

boolean` `
https://developer.android.com/reference/java/lang/Enum#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object other)
`

Returns true if the specified object is equal to this
enum constant.


`


final

void` `
https://developer.android.com/reference/java/lang/Enum#finalize()()
`

enum classes cannot have finalize methods.


`


final

https://developer.android.com/reference/java/lang/Class<https://developer.android.com/reference/java/security/DrbgParameters.Capability>` `
https://developer.android.com/reference/java/lang/Enum#getDeclaringClass()()
`

Returns the Class object corresponding to this enum constant's
enum type.


`


final

int` `
https://developer.android.com/reference/java/lang/Enum#hashCode()()
`

Returns a hash code for this enum constant.


`


final

https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Enum#name()()
`

Returns the name of this enum constant, exactly as declared in its
enum declaration.


`


final

int` `
https://developer.android.com/reference/java/lang/Enum#ordinal()()
`

Returns the ordinal of this enumeration constant (its position
in its enum declaration, where the initial constant is assigned
an ordinal of zero).


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Enum#toString()()
`

Returns the name of this enum constant, as contained in the
declaration.


`


static

<T extends https://developer.android.com/reference/java/lang/Enum<T>>
T` `
https://developer.android.com/reference/java/lang/Enum#valueOf(java.lang.Class<T>,%20java.lang.String)(https://developer.android.com/reference/java/lang/Class<T> enumClass, https://developer.android.com/reference/java/lang/String name)
`

Returns the enum constant of the specified enum class with the
specified name.


From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


From interface `

https://developer.android.com/reference/java/lang/Comparable

` `
abstract


int` `
https://developer.android.com/reference/java/lang/Comparable#compareTo(T)(https://developer.android.com/reference/java/security/DrbgParameters.Capability o)
`

Compares this object with the specified object for order.


## Enum values

### NONE

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

```
public static final DrbgParameters.Capability NONE
```

Neither prediction resistance nor reseed.

<br />

### PR_AND_RESEED

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

```
public static final DrbgParameters.Capability PR_AND_RESEED
```

Both prediction resistance and reseed.

<br />

### RESEED_ONLY

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

```
public static final DrbgParameters.Capability RESEED_ONLY
```

Reseed but no prediction resistance.

<br />

## Public methods

### supportsPredictionResistance

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

```
public boolean supportsPredictionResistance ()
```

Returns whether this capability supports prediction resistance.

<br />

| Returns ||
|---|---|
| `boolean` | `true` for `https://developer.android.com/reference/java/security/DrbgParameters.Capability#PR_AND_RESEED`, and `false` for `https://developer.android.com/reference/java/security/DrbgParameters.Capability#RESEED_ONLY` and `https://developer.android.com/reference/java/security/DrbgParameters.Capability#NONE` <br /> |

### supportsReseeding

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

```
public boolean supportsReseeding ()
```

Returns whether this capability supports reseeding.

<br />

| Returns ||
|---|---|
| `boolean` | `true` for `https://developer.android.com/reference/java/security/DrbgParameters.Capability#PR_AND_RESEED` and `https://developer.android.com/reference/java/security/DrbgParameters.Capability#RESEED_ONLY`, and `false` for `https://developer.android.com/reference/java/security/DrbgParameters.Capability#NONE` <br /> |

### toString

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

```
public String toString ()
```

Returns the name of this enum constant, as contained in the
declaration. This method may be overridden, though it typically
isn't necessary or desirable. An enum class should override this
method when a more "programmer-friendly" string form exists.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the name of this enum constant <br /> |

### valueOf

```
public static DrbgParameters.Capability valueOf (String name)
```

<br />

<br />

| Parameters ||
|---|---|
| `name` | `String` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/security/DrbgParameters.Capability` | <br /> |

### values

```
public static final Capability[] values ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/security/DrbgParameters.Capability` | <br /> |