Class SecureRandomSecretGenerator

java.lang.Object
com.irurueta.authserver.authorization.domain.totp.SecureRandomSecretGenerator
All Implemented Interfaces:
SecretGenerator

public class SecureRandomSecretGenerator extends Object implements SecretGenerator
Creates 160-bit secrets, the length RFC 4226 recommends for HMAC-SHA1, from a SecureRandom.
  • Field Details

    • SECRET_BYTES

      public static final int SECRET_BYTES
      Length of a secret in bytes, which is 160 bits.
      See Also:
    • random

      private final SecureRandom random
      Source of randomness.
  • Constructor Details

    • SecureRandomSecretGenerator

      public SecureRandomSecretGenerator()
  • Method Details