pseudoRandomData method

List<int> pseudoRandomData(
  1. int outputLen
)

Generate pseudo-random data using the PRF operation in Strobe.

The pseudoRandomData method is used to generate pseudo-random data by invoking the PRF (Pseudo-Random Function) operation in the Strobe protocol. PRF generates cryptographically secure random bytes that can be used for various purposes, such as key derivation or secure random number generation.

Parameters:

  • outputLen: The length (in bytes) of the pseudo-random data to generate.

Returns:

  • A List<int> containing the generated pseudo-random data.

Usage:

int outputLength = 32; // Length of the desired pseudo-random data.
List<int> randomData = strobeInstance.pseudoRandomData(outputLength);
// Generate pseudo-random data for a specific use case.

The pseudoRandomData method is suitable for generating random data with high entropy, making it suitable for cryptographic applications.

Implementation

List<int> pseudoRandomData(int outputLen) {
  return operate(false, StrobeOperation.prf, List.empty(), outputLen, false);
}