org.apache.hadoop.security.authentication.util

## Class RandomSignerSecretProvider

- java.lang.Object
- - org.apache.hadoop.security.authentication.util.SignerSecretProvider
  - - org.apache.hadoop.security.authentication.util.RolloverSignerSecretProvider
    - - org.apache.hadoop.security.authentication.util.RandomSignerSecretProvider

-     @InterfaceStability.Unstable
       @InterfaceAudience.Private
      public class RandomSignerSecretProvider
      extends RolloverSignerSecretProvider

  A SignerSecretProvider that uses a random number as its secret. It rolls the secret at a regular interval.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RandomSignerSecretProvider()`
    `RandomSignerSecretProvider(long seed)` This constructor lets you set the seed of the Random Number Generator and is meant for testing.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected byte[]` | `generateNewSecret()` Subclasses should implement this to return a new secret.

    - ### Methods inherited from class org.apache.hadoop.security.authentication.util.RolloverSignerSecretProvider

      `destroy, getAllSecrets, getCurrentSecret, init, initSecrets, rollSecret, startScheduler`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RandomSignerSecretProvider

          public RandomSignerSecretProvider()

    - #### RandomSignerSecretProvider

          public RandomSignerSecretProvider(long seed)

      This constructor lets you set the seed of the Random Number Generator and is meant for testing.
      Parameters:
        `seed` - the seed for the random number generator

  - ### Method Detail

    - #### generateNewSecret

          protected byte[] generateNewSecret()

      Description copied from class: `RolloverSignerSecretProvider`
      Subclasses should implement this to return a new secret. It will be called automatically at the secret rollover interval. It should never return null.
      Specified by:
        `generateNewSecret` in class `RolloverSignerSecretProvider`
      Returns:
        a new secret

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.