Base64 Options

PIE (Pixel Image Encoder) 
Base64 Options
Version 1.4+

The Base64 options allows for files and text to be base64 encoded and decoded. Optional, PIE does not need to use this when encoding or decoding. However can be used to create and serve certificates. See Command Line Usage.

This function can be used on a command line or within your own code. Primary usage for this would be for users who don't have access to programming languages and would like to use this software to encode files. An example would be to embed a font or an image in html headers.

Encoding Command

Parameter Usage Description Required
encode_file_to_base64 -encode_file_to_base64 Instruction value. Yes
source -file "path to file" Path to the source file you want encoded. Yes
directory -directory "path to folder" Path to the folder you want the encoded file to be stored. No

Decoding Command

Parameter Usage Description Required
decode_base64_file -decode_base64_file Instruction value. Yes
source -file "path to file" Path to the source file you want decoded. Must contain a base64 string. Yes
-base64_file "iVB ... mCC" A base64 string. Yes
directory -directory "path to folder" Path to the folder you want the encoded file to be stored. No
name -name Name of the file to be created. No (Unknown will be used if not entered)

Base64 options (Command line)

To encode a file

java -cp .\pie-x.x.jar Pie 
	-encode_file_to_base64 
	-file ".\f4657dd5-cd98-4f8f-9c05-a03c2033c799.pie" 
	-directory ".\"

"-directory" : leaving this out will send the base64 text directly to the console window. If left in the name of the file will be used and ".txt" will be added.

java -cp .\pie-x.x.jar Pie 
	-encode_file_to_base64 
	-file ".\f4657dd5-cd98-4f8f-9c05-a03c2033c799.pie" 

Example output

iVBORw0KGgoAAAANSUhEUgAAABMAAAAMCAYA ..... 6EUAAAAAElFTkSuQmCC

Decoding a base64 file (a file with base64 encoded text inside which was a file)

java -cp .\pie-x.x.jar Pie 
	-decode_base64_file -file ".\f4657dd5-cd98-4f8f-9c05-a03c2033c799.pie.txt" 
	-directory ".\" 
	-name "my_cert.pie"

Decoding a base64 string which was a file

java -cp .\pie-x.x.jar Pie
	-decode_base64_file
    -base64_file "iVBORw0KGgoAAAANSUhEUgAAAA8AAAAKCAYAAABrGw ... +YAAAAAElFTkSuQmCC"
    -directory ".\"
    -name "my_cert.pie"		(Optional "unknown" used if not entered)