Interface ISecureRandomSupplier

All Known Implementing Classes:
DefaultSecureRandomSupplier

public interface ISecureRandomSupplier
Supplies the Wicket application with random bytes.
Author:
papegaaij
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the actual SecureRandom being used as source.
    default String
    getRandomBase64(int length)
    Returns a url-base64 encoded string with random content, base on length bytes.
    default byte[]
    getRandomBytes(int length)
    Returns a byte array with random bytes of the given length.
  • Method Details

    • getRandom

      Returns the actual SecureRandom being used as source.
      Returns:
      The SecureRandom.
    • getRandomBytes

      default byte[] getRandomBytes(int length)
      Returns a byte array with random bytes of the given length.
      Parameters:
      length - The number of bytes to return.
      Returns:
      A byte array with random bytes of the given length.
    • getRandomBase64

      default String getRandomBase64(int length)
      Returns a url-base64 encoded string with random content, base on length bytes. The length of the returned string will be length/3*4.
      Parameters:
      length - The number of random bytes to use as input.
      Returns:
      A string with random base64 data.