mirror of https://github.com/progval/irctest.git
10 lines
292 B
Python
10 lines
292 B
Python
|
import uuid
|
||
|
|
||
|
def default_nonce_factory():
|
||
|
"""Generate a random string for digest authentication challenges.
|
||
|
The string should be cryptographicaly secure random pattern.
|
||
|
:return: the string generated.
|
||
|
:returntype: `bytes`
|
||
|
"""
|
||
|
return uuid.uuid4().hex.encode("us-ascii")
|