22 Apr 2012 21:19:15 UTC
- Distribution: Convert-Base32
- Module version: 0.06
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (7453 / 0 / 0)
- KwaliteeBus factor: 1
- 51.85% Coverage
- License: unknown
- Activity24 month
- Download (4.08KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
Convert::Base32 - Encoding and decoding of base32 strings
use Convert::Base32; $encoded = encode_base32("\x3a\x27\x0f\x93"); $decoded = decode_base32($encoded);
This module provides functions to convert string from / to Base32 encoding, specified in RACE internet-draft. The Base32 encoding is designed to encode non-ASCII characters in DNS-compatible host name parts.
See http://tools.ietf.org/html/draft-ietf-idn-race-03 for more details.
Following functions are provided; like
MIME::Base64, they are in @EXPORT array. See Exporter for details.
Encode data by calling the encode_base32() function. This function takes a string of bytes to encode and returns the encoded base32 string.
Decode a base32 string by calling the decode_base32() function. This function takes a string to decode and returns the decoded string.
This function might throw the exceptions such as "Data contains non-base32 characters", "Length of data invalid" and "Padding bits at the end of output buffer are not all zero".
decode_base32 differs from the specification in that upper case letters are treated as their lower case equivalent rather than producing an error.
Tatsuhiko Miyagawa <firstname.lastname@example.org>
Eric Brine <email@example.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Convert::Base32, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Convert::Base32
For more information on module installation, please visit the detailed CPAN module installation guide.