| 1 |
NAME |
| 2 |
Convert::Base32 - Encoding and decoding of base32 strings |
| 3 |
|
| 4 |
SYNOPSIS |
| 5 |
use Convert::Base32; |
| 6 |
|
| 7 |
$encoded = encode_base32("\x3a\x27\x0f\x93"); |
| 8 |
$decoded = decode_base32($encoded); |
| 9 |
|
| 10 |
DESCRIPTION |
| 11 |
This module provides functions to convert string from / to Base32 |
| 12 |
encoding, specified in RACE internet-draft. The Base32 encoding is |
| 13 |
designed to encode non-ASCII characters in DNS-compatible host name |
| 14 |
parts. |
| 15 |
|
| 16 |
See http://www.ietf.org/internet-drafts/draft-ietf-idn-race-03.txt for |
| 17 |
more details. |
| 18 |
|
| 19 |
FUNCTIONS |
| 20 |
Following functions are provided; like "MIME::Base64", they are in |
| 21 |
@EXPORT array. See the Exporter manpage for details. |
| 22 |
|
| 23 |
encode_base32($str) |
| 24 |
Encode data by calling the encode_base32() function. This function |
| 25 |
takes a string to encode and returns the encoded base32 string. |
| 26 |
|
| 27 |
decode_base32($str) |
| 28 |
Decode a base32 string by calling the decode_base32() function. This |
| 29 |
function takes a string to decode and returns the decoded string. |
| 30 |
|
| 31 |
This function might throw the exceptions such as "Data contains |
| 32 |
non-base32 characters", "Length of data invalid" and "PADDING number |
| 33 |
of bits at the end of output buffer are not all zero". |
| 34 |
|
| 35 |
AUTHOR |
| 36 |
Tatsuhiko Miyagawa <[email protected]> |
| 37 |
|
| 38 |
This library is free software; you can redistribute it and/or modify |
| 39 |
it under the same terms as Perl itself. |
| 40 |
|
| 41 |
SEE ALSO |
| 42 |
http://www.ietf.org/internet-drafts/draft-ietf-idn-race-03.txt, the |
| 43 |
MIME::Base64 manpage, the Convert::RACE manpage. |
| 44 |
|