(self, name, data, secret=None, **kwargs)
Save a signed cookie with ``secret`` signature

        Saves a signed cookie of the pickled data. All other keyword
        arguments that ``WebOb.set_cookie`` accepts are usable and
        passed to the WebOb set_cookie method after creating the signed
        cookie value.
Save a signed cookie with ``secret`` signature
Save a signed cookie with secret signature
def signed_cookie(self, name, data, secret=None, **kwargs):
        """Save a signed cookie with ``secret`` signature

        Saves a signed cookie of the pickled data. All other keyword
        arguments that ``WebOb.set_cookie`` accepts are usable and
        passed to the WebOb set_cookie method after creating the signed
        cookie value.

        """
        pickled = pickle.dumps(data, pickle.HIGHEST_PROTOCOL)
        sig = hmac.new(secret, pickled, sha1).hexdigest()
        self.set_cookie(name, sig + base64.standard_b64encode(pickled), **kwargs)
def signed_cookie ( self , name , data , secret = None , * * kwargs ) : pickled = pickle . dumps ( data , pickle . HIGHEST_PROTOCOL ) sig = hmac . new ( secret , pickled , sha1 ) . hexdigest ( ) self . set_cookie ( name , sig + base64 . standard_b64encode ( pickled ) , * * kwargs )