(realm, algorithm=MD5)
return encoder(s.encode("utf-8"))
This is an auxaliary function that calculates 'nonce' value. It is used
    to handle sessions.
This is an auxaliary function that calculates 'nonce' value. It is used
    to handle sessions.
This is an auxaliary function that calculates nonce value . It is used to handle sessions .
def calculateNonce(realm, algorithm=MD5):
    """This is an auxaliary function that calculates 'nonce' value. It is used
    to handle sessions."""

    assert algorithm in SUPPORTED_ALGORITHM

    try:
        encoder = DIGEST_AUTH_ENCODERS[algorithm]
    except KeyError:
        raise NotImplementedError(
            "The chosen algorithm (%s) does not have "
            "an implementation yet" % algorithm
        )

    s = "%d:%s" % (time.time(), realm)
    return encoder(s.encode("utf-8"))
def calculateNonce ( realm , algorithm = MD5 ) : assert algorithm in SUPPORTED_ALGORITHM try : encoder = DIGEST_AUTH_ENCODERS [ algorithm ] except KeyError : raise NotImplementedError ( "The chosen algorithm (%s) does not have " "an implementation yet" % algorithm ) s = "%d:%s" % ( time . time ( ) , realm ) return encoder ( s . encode ( "utf-8" ) )