User Tools

Site Tools


howtos:de-base64

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

howtos:de-base64 [d/m/Y H:i] (current)
Line 1: Line 1:
 +===== Perl script to decode a base64 encoded input =====
  
 +
 +<file>
 +#!/usr/bin/perl -w 
 +use MIME::Base64;
 +print "\n";
 +foreach (@ARGV) {
 +  print decode_base64("$_");
 +  print "\n\n";
 +}
 +</file>
 +
 +The script take the base64 encoded input as a parameter and output the result. Like this:
 +
 +<code>
 +de-base64.pl ZW5jb2RlZC1iYXNlNjQtdGV4dA==
 +
 +encoded-base64-text
 +
 +</code>
 +
 +===== Perl script to encode input to base64 =====
 +
 +
 +<file>
 +#!/usr/bin/perl -w 
 +use MIME::Base64;
 +print "\n";
 +foreach (@ARGV) {
 +  print encode_base64("$_");
 +  print "\n\n";
 +}
 +</file>
 +
 +It is run the same way as de-base64.pl.
howtos/de-base64.txt · Last modified: d/m/Y H:i (external edit)