MIME-Base64

The modules in the MIME-Base64 package provide functions to encode and decode strings in either base64 or quoted-printable encoding as described in RFC 2045 and Chapter 3, Multipurpose Internet Mail Extensions. The MIME-Base64 package was written by Gisle Aas ([email protected]).

The MIME::Base64 module includes a small C program that may optionally be installed to perform the encoding. If compiled and installed, base64 encoding and decoding can occur up to 20 times faster than the pure Perl version. If you do not wish to use this option, remove the file Base64.xs before running perl Makefile.PL.

Contents:

  • Base64.pm

  • Base64.xs (optional)

  • QuotedPrint.pm

Version Documented: 2.05 dated 27 January 1998

Dependencies:

  • Perl 5.002 or higher

MIME::Base64 Synopsis:

Public instance methods:
    String encode_base64(String)    # Encodes a string to Base64.
    String decode_base64 (String)   # Decodes a string/rom Base64.

MIME:: QuotedPrint Synopsis:

Public instance methods:
     String encode_qp(String)       # Encodes a string to Quoted Printable.
     String decode_qp(String)       # Decodes a string from Quoted Printable.

The following example shows how to use the MIME::Base64 module to encode and decode a string. The MIME::QuotedPrint module is used in exactly the same way.

use MIME::Base64;
$decoded_stuff = 'A string to encode.';
$encoded_stuff = encode_base64($decoded_stuff);
$new_decoded_stuff = decode_base64($encoded_stuff);

# Note that $decoded_stuff eq $new_decoded_stuff
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.183.150