| * Base64 encoding/decoding (RFC1341) - test program |
| * Copyright (c) 2005, Jouni Malinen <j@w1.fi> |
| * This software may be distributed under the terms of the BSD license. |
| * See README for more details. |
| #include "utils/includes.h" |
| #include "utils/base64.h" |
| int main(int argc, char *argv[]) |
| printf("Usage: base64 <encode|decode> <in file> <out file>\n"); |
| buf = (unsigned char *) os_readfile(argv[2], &len); |
| if (strcmp(argv[1], "encode") == 0) |
| e = base64_encode(buf, len, &elen); |
| e = base64_decode(buf, len, &elen); |