parameters: (self, s, key)
return_statement: return False
docstring: Validate the nonce.
          Returns True if nonce was generated by synthesize_nonce() and the
          timestamp is not spoofed, else returns False.
  
          s
              A string related to the resource, such as the hostname of
              the server.
  
          key
              A secret string known only to the server.
  
          Both s and key must be the same values which were used to synthesize
          the nonce we are trying to validate.
docstring_summary: Validate the nonce.
          Returns True if nonce was generated by synthesize_nonce() and the
          timestamp is not spoofed, else returns False.
docstring_tokens: Validate the nonce . Returns True if nonce was generated by synthesize_nonce () and the timestamp is not spoofed else returns False .
function: def validate_nonce(self, s, key):
          """Validate the nonce.
          Returns True if nonce was generated by synthesize_nonce() and the
          timestamp is not spoofed, else returns False.
  
          s
              A string related to the resource, such as the hostname of
              the server.
  
          key
              A secret string known only to the server.
  
          Both s and key must be the same values which were used to synthesize
          the nonce we are trying to validate.
          """
          try:
              timestamp, hashpart = self.nonce.split(':', 1)
              s_timestamp, s_hashpart = synthesize_nonce(
                  s, key, timestamp).split(':', 1)
              is_valid = s_hashpart == hashpart
              if self.debug:
                  TRACE('validate_nonce: %s' % is_valid)
              return is_valid
          except ValueError:  # split() error
              pass
          return False
function_tokens: def validate_nonce ( self , s , key ) : try : timestamp , hashpart = self . nonce . split ( ':' , 1 ) s_timestamp , s_hashpart = synthesize_nonce ( s , key , timestamp ) . split ( ':' , 1 ) is_valid = s_hashpart == hashpart if self . debug : TRACE ( 'validate_nonce: %s' % is_valid ) return is_valid except ValueError : # split() error pass return False