ot::NetworkKey::GenerateRandom() method
Generates a cryptographically secure random sequence to populate the Thread Network Key.
Syntax
Error GenerateRandom(void); Return value
kErrorNone Successfully generated a random Thread Network Key. kErrorFailed Failed to generate random sequence.