#include <assert.h>#include <stdio.h>#include <string.h>#include "util.h"#include "BroString.h"#include "Conn.h"Include dependency graph for Base64.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| class | Base64Decoder |
Functions | |
| BroString * | decode_base64 (BroString *s) |
|
|
Definition at line 147 of file Base64.cc. References BroString, BroString::Bytes(), Base64Decoder::Decode(), Base64Decoder::Done(), and BroString::Len().
00148 {
00149 int rlen;
00150 char* rbuf = 0;
00151 int rlen2;
00152 char* rbuf2 = 0;
00153
00154 Base64Decoder dec(0);
00155 if ( dec.Decode(s->Len(), (const char*) s->Bytes(), &rlen, &rbuf) == -1 )
00156 goto err;
00157
00158 if ( dec.Done(&rlen2, &rbuf2) < 0 )
00159 goto err;
00160
00161 rbuf[rlen] = '\0';
00162 return new BroString(1, (u_char*) rbuf, rlen);
00163
00164 err:
00165 delete [] rbuf;
00166 delete [] rbuf2;
00167 return 0;
00168 }
|
1.3.5