(id, answer)
return key
Encodes the challenge ID and the answer into a string which is safe
    to give to a potentially hostile client

    The key is base64-encoding of 'id:expirytime:answer'
Encodes the challenge ID and the answer into a string which is safe
    to give to a potentially hostile client
Encodes the challenge ID and the answer into a string which is safe to give to a potentially hostile client
def _encodeKey(id, answer):
    """
    Encodes the challenge ID and the answer into a string which is safe
    to give to a potentially hostile client

    The key is base64-encoding of 'id:expirytime:answer'
    """
    expiryTime = int(time.time() + captchaTimeout)
    sig = _signChallenge(id, answer, expiryTime)
    raw = "%s:%x:%s" % (id, expiryTime, sig)
    key = base64.encodestring(raw).replace("\n", "")
    return key
def _encodeKey ( id , answer ) : expiryTime = int ( time . time ( ) + captchaTimeout ) sig = _signChallenge ( id , answer , expiryTime ) raw = "%s:%x:%s" % ( id , expiryTime , sig ) key = base64 . encodestring ( raw ) . replace ( "\n" , "" ) return key