You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example documentation for resty.random.bytes() contains a while loop. Is there a situation where resty.random.bytes() can return nil, or is this an error in the documentation?
localresty_random=require"resty.random"localstr=require"resty.string"localstrong_random=resty_random.bytes(16,true)
-- attempt to generate 16 bytes of-- cryptographically strong random datawhilestrong_random==nildostrong_random=resty_random.bytes(16,true)
endngx.say("random: ", str.to_hex(strong_random))
The text was updated successfully, but these errors were encountered:
@agentzh
The example documentation for resty.random.bytes() contains a while loop. Is there a situation where resty.random.bytes() can return nil, or is this an error in the documentation?
The text was updated successfully, but these errors were encountered: