def new_secure_hash(text_type=None):
 if text_type:
  return sha1(text_type).hexdigest()
 else:
  return sha1()

def new_secure_hash ( text_type = None ) : if text_type : return sha1 ( text_type ) . hexdigest ( ) else : return sha1 ( )
returns either a sha1 hash object .