Base64 Options
Base64 Options
Version 1.4+
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.
The 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 |
base64 encode | -base64_encode | 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. Do not include "\" on the end. This will remove the quote. | No |
name | -name | Name of the file to be created. Takes source name if available. | No |
Decoding Command
Parameter | Usage | Description | Required |
base64 decode | -base64_decode | 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
-base64_encode
-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
-base64_encode
-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
-base64_decode ".\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
-base64_decode
-base64_file "iVBORw0KGgoAAAANSUhEUgAAAA8AAAAKCAYAAABrGw ... +YAAAAAElFTkSuQmCC"
-directory ".\"
-name "my_cert.pie" (Optional "unknown" used if not entered)