Free website sponsorship

Recent Forum Topics

View Discussion beeen a while

since i been oon here :( - summer break = me away from computer.... - how was everyones summer..... - ....any1 have ideas for a csharp project

View Discussion How to setup php so I can use mail() function?

You can set it up in php.ini. http://www.w3schools.com/PHP/php_ref_mail.asp has information on the configuration options required.

View Discussion Creating Identical Tables: HTML and CSS Article

http://programming-designs.com/page/editorials/item/6 - It was under the articles/editorials section of the main site, not the most logical place but PD only had one html tut...

View Discussion LISP

Lisp is cool in a few ways, but the one that strikes most people is that everything is a list. Hence, it is a pretty good list processor. When the first element of a list is not escaped (quoted - described below), th...

View Discussion Review Script: New Job Board Software

We are happy to announce the release of [url=http://www.smartjobboard.com]SmartJobBoard[/url] job board software. [url=http://www.smartjobboard.com]SmartJobBoard[/url] i...


Base64 Encoder/Decoder

Before proceeding to read download the source code please note that all the information required to write the encoder can be found on the about.com website. When writing this application I researched about how Base64 encoding works and read up a bit on bit shifting, a technique used in C/C++ and Java programming. I have provided the URLs to Base64 information below:

About.com - Used for research on how Base64 works.

Base64 Encoder and Decoder (makcoder) - Used to test my app results.

Description & Usage Information

This application is a fully functional Base64 Encoder /Decoder. Blocks of code are commented as they were earlier versions/methods used for the application and may no longer work. The methods used in this application were written and coded purely by it's author and no code was taken from any other variants of its kind.

Download the source code now.

I do realize some methods used in the code may not be the most efficient, but the application was written for learning purposes and no guarantees are bound by this source code except learning a thing or two.

Using the application is simple. Since this is a command-line application you must run cmd.exe and go to the directory of this file and type the following command: java Base64 -arg[0] -arg[1] "arg[2]" "optional arg[3]"

Arg # Argument Description
args[0] -encode
-decode
Encode Base64
Decode Base64
args[1] -f
-s
Encoding/Decoding file
Encoding/Decoding string
args[2] "source_path_here"
"source_string_here"
Path of source data
Source Data String
args[3] "output_path_here" Define output location. If undefined, outputs to path of file ".base64" unless -s argument is used then it will be directly outputted to console.

Example of use (encode file):
java Base64 -encode -f "C:\family_photo.jpg" "C:\family_photo.base64"

Example of use (decode file):
java Base64 -decode -f "C:\family_photo.base64" "C:\family_photo.jpg"

Example of use (encode string, output console):
java Base64 -encode -s "Hello"

Example of use (decode string, output file):
java Base64 -decode -s "SGVsbG8="