ESAPI-C 1.0
The OWASP Enterprise Security API for C

canonicalize.c File Reference

A Canonicalization module implementation. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include "codec.h"
#include "canonicalize.h"

Go to the source code of this file.

Defines

#define GROW_LEN   32

Functions

char * straight_port_decode (codec *c, char *input)
char * straight_port_encode (codec *c, char *input)
char * _codec_decode (codec *c, char *s)
char * _codec_encode (codec *c, char *s)
char * esapi_canonicalize (const char *input, codec *codecs, int codec_count, bool strict)
 Fully decode the given character array with the given codecs.

Detailed Description

A Canonicalization module implementation.

Todo:
This module is unfinished. When it is fixed, OS command shell encoding can be performed by esapi_execute().
Todo:
If it is feasible, the Base64 encoding module could be refactored into a Base64 codec.
Since:
January 30, 2011

Definition in file canonicalize.c.


Function Documentation

char* esapi_canonicalize ( const char *  ,
codec ,
int  ,
bool   
)

Fully decode the given character array with the given codecs.

This function will successfully decode strings that have been encoded with multiple codecs as well as multiple times with any one codec.

Definition at line 120 of file canonicalize.c.

 All Data Structures Files Functions Variables Typedefs Defines