[gnet-dev] gnet_base64_decode does only partial decode
- From: Siddhartha Jain <sid netmagicsolutions com>
- To: gnet-dev lists gnetlibrary org
- Subject: [gnet-dev] gnet_base64_decode does only partial decode
- Date: Mon, 30 May 2005 18:13:47 +0530
Hi,
Need more help with this library.
Using Gnet-2.0.7 and GLib-2.6.4
Here's the code:
----b64.c-----------
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <gnet-2.0/gnet.h>
int main(int argc, char **argv)
{
gchar* b64;
gchar* bin;
gint lens2;
gnet_init();
b64 = argv[1];
bin = gnet_base64_decode(b64,strlen(b64),&lens2);
g_print("act=%s len=%i\n\n",bin,lens2);
return 0;
}
----b64.c-----------
[root opensims progs]# ./b64
TVpLRVJORUwzMi5ETEwAAExvYWRMaWJyYXJ5QQAAAABHZXRQcm9jQWRkcmVzcwAAU3ltYW50ZWNT
Output
======
act=MZKERNEL32.DLL len=57
[root opensims progs]# echo
TVpLRVJORUwzMi5ETEwAAExvYWRMaWJyYXJ5QQAAAABHZXRQcm9jQWRkcmVzcwAAU3ltYW50ZWNT
| base64 -d
Output
======
MZKERNEL32.DLLLoadLibraryAGetProcAddressSymantecS
'base64' is the program I picked up from:
http://www.fourmilab.ch/webtools/base64/
What am I missing?
Thanks,
Siddhartha
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]