ESAPI-C 1.0
The OWASP Enterprise Security API for C

access_ref.h

Go to the documentation of this file.
00001 
00029 #include <stdbool.h>
00030 
00031 #include "crypto.h"
00032 #include "uthash.h"
00033 
00034 #ifndef _ACCESS_REF_H
00035 #define _ACCESS_REF_H
00036 
00040 #define KEY_LEN  7
00041 
00047 #define VAL_LEN 64
00048 
00053 struct Map_t {
00054         char key[KEY_LEN + 1];
00055         char val[VAL_LEN + 1];
00056         UT_hash_handle hh_k; // handle for first hash table - key
00057         UT_hash_handle hh_v; // handle for second hash table - value
00058 };
00059 
00060 typedef struct Map_t map_t;
00061 
00062 extern map_t *v_map;
00063 extern map_t *k_map;
00064 
00072 extern bool esapi_put_reference(const char *, const char *);
00073 
00079 extern char *esapi_get_indirect_reference(const char *);
00080 
00086 extern char *esapi_get_direct_reference(const char *);
00087 
00092 extern bool esapi_remove_direct_reference(const char *);
00093 
00098 extern bool esapi_remove_indirect_reference(const char *);
00099 
00104 extern char *esapi_get_unique_reference();
00105 
00106 #endif
00107 
 All Data Structures Files Functions Variables Typedefs Defines