Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
Showing results for 
Search instead for 
Did you mean: 

Base64 Converter

Regular Advisor

Base64 Converter

Hi everyone. I was wondering whether someone has a way to convert text to Base64 in HPUX 11. Thanks in advanced. Tommy
A. Clay Stephenson
Acclaimed Contributor

Re: Base64 Converter

I'm reading into this that you are dealing with MIME octet-stream base64 encoding.

Have a look at the mpack/mumpack utility available from any of the HP-UX Porting Centre's.
If it ain't broke, I can fix that.
H.Merijn Brand (procura
Honored Contributor

Re: Base64 Converter

# perl -MMIME::Base64 -e ....

MIME::Base64(3pm) Perl Programmers Reference Guide MIME::Base64(3pm)

MIME::Base64 - Encoding and decoding of base64 strings

use MIME::Base64;

$encoded = encode_base64('Aladdin:open sesame');
$decoded = decode_base64($encoded);

This module provides functions to encode and decode strings into the
Base64 encoding specified in RFC 2045 - MIME (Multipurpose Internet
Mail Extensions). The Base64 encoding is designed to represent arbi-
trary sequences of octets in a form that need not be humanly readable.
A 65-character subset ([A-Za-z0-9+/=]) of US-ASCII is used, enabling 6
bits to be represented per printable character.

The following functions are provided:

encode_base64($str, [$eol])
Encode data by calling the encode_base64() function. The first
argument is the string to encode. The second argument is the line
ending sequence to use (it is optional and defaults to "\n"). The
returned encoded string is broken into lines of no more than 76
characters each and it will end with $eol unless it is empty. Pass
an empty string as second argument if you do not want the encoded
string broken into lines.

Decode a base64 string by calling the decode_base64() function.
This function takes a single argument which is the string to decode
and returns the decoded data.

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Regular Advisor

Re: Base64 Converter

Actually, I need just a regular string converted to base64 as described in RFC 1521.
H.Merijn Brand (procura
Honored Contributor

Re: Base64 Converter

Which is done with MIME::Base64



A class for parsing in and manipulating RFC-822 message headers, with some methods geared towards standard (and not so standard) MIME fields as specified in RFC-1521, Multipurpose Internet Mail Extensions.

Enter 1521 in

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn