Generate high-entropy random seed for encryption or other scenarios requiring high-quality random numbers.
Uses blockchain hash as entropy source to ensure randomness.
Args:
seed_length (int): Length of seed to generate (in bytes)
salt (str, optional): Random number salt value for increased randomness. Defaults to "".
Returns:
str: JSON string containing random seed, formatted as:
{
"requestId": "Generated request ID",
"randomSeed": "Random seed in hexadecimal format",
"entropy": Estimated entropy value
}
Application Scenarios:
1. Key generation (encryption keys, signature seeds)
2. Security tokens (session identifiers, authentication tokens)
3. Random number initialization (PRNG seeds, simulation initial states)
4. Unique identifier generation (UUID seeds, random identifiers)