4b5cd61950725b446645ab7276dd60cb3765d8e8
galt
  Mon Feb 10 12:30:20 2014 -0800
initial work on creating a random session key for greater securiy of cart data
diff --git src/hg/inc/cartDb.h src/hg/inc/cartDb.h
index e18a3a5..e763cbf 100644
--- src/hg/inc/cartDb.h
+++ src/hg/inc/cartDb.h
@@ -7,32 +7,39 @@
 
 #ifndef JKSQL_H
 #include "jksql.h"
 #endif
 
 struct cartDb
 /* A simple id/contents pair for persistent storing of cart variables */
     {
     struct cartDb *next;  /* Next in singly linked list. */
     unsigned int id;	/* Cart ID */
     char *contents;	/* Contents - encoded variables */
     int reserved;	/* Reserved, currently always zero. */
     char *firstUse;	/* First time this was used */
     char *lastUse;	/* Last time this was used */
     int useCount;	/* Number of times used */
+    char *sessionKey;	/* Random Key for session security */
     };
 
+boolean cartDbHasSessionKey(struct sqlConnection *conn, char *table);
+/* Check to see if the table has the sessionKey field */
+
+boolean cartDbUseSessionKey();
+/* Check settings and and state to determine if sessionKey is in use */
+
 void cartDbStaticLoad(char **row, struct cartDb *ret);
 /* Load a row from cartDb table into ret.  The contents of ret will
  * be replaced at the next call to this function. */
 
 struct cartDb *cartDbLoad(char **row);
 /* Load a cartDb from row fetched with select * from cartDb
  * from database.  Dispose of this with cartDbFree(). */
 
 struct cartDb *cartDbLoadAll(char *fileName);
 /* Load all cartDb from a tab-separated file.
  * Dispose of this with cartDbFreeList(). */
 
 struct cartDb *cartDbLoadWhere(struct sqlConnection *conn, char *table, char *where);
 /* Load all cartDb from table that satisfy where clause. The
  * where clause may be NULL in which case whole table is loaded