DESCRIPTION

Encode::Base58::GMP is a Base58 encoder/decoder implementation using the GNU Multiple Precision Arithmetic Library (GMP) with transcoding between Flickr, Bitcoin and GMP Base58 implementations. The Flickr alphabet is the default and used when no alphabet is provided.

The encode_base58, decode_base58 and md5_base58 methods support an alphabet parameter which can be set to the supported alphabets ['bitcoin', 'flickr', 'gmp'] to indicate the value to be encoded or decoded.

Requirements

This module requires GMP 4.2.0 and above. Prior versions are limited to Base36.

Perl 5.8.9 or above is required to ensure proper bigint handling. If you are not using bigint numbers, it may be possible to skip the bigint tests and do a force install; however, lower Perl versions are not supported.

FUNCTIONS

encode_base58 ( $number [, $alphabet ] )

This routine encodes a $number in Base58. $number can be a Math::GMPz object or a binary, octal, decimal or hexidecimal number. Binary, octal and hexidecimal string literals must be prefixed with 0[Bb]/0/0[Xx] respectively. The Flickr alphabet is used unless $alphabet is set to 'gmp'.

decode_base58 ( $base58 [, $alphabet ] )

This routine decodes a Base58 value and returns a Math::GMPz object. Use int on the return value to convert the Math::GMPz object to an integer. The Flickr alphabet is used unless $alphabet is set to 'gmp'.

base58_from_to( $base58, $from_alphabet, $to_alphabet )

This routine encodes a Base58 string from one encoding to another encoding. This routing is not exported by default.

base58_flickr_to_gmp( $base58_as_flickr )

This routine converts a Flickr Base58 string to a GMP Base58 string. This routine is not exported by default.

base58_gmp_to_flickr( $base58_as_gmp )

This routine converts a GMP Base58 string to a Flickr Base58 string. This routine is not exported by default.

md5_base58( $data [, $alphabet ] )

This routine returns a MD5 digest in Base58. This routine is not exported by default.

CHANGES

1.00 April 30, 2013

Add Bitcoin alphabet support.

Add zero-padding for md5_base58. This is an incompatible change from version 0.09.

INCOMPATIBLE CHANGES

1.00 April 30, 2013

md5_base58 is now zero-padded to provide a fixed-length Base58 string. Prior versions were not padding with leading zero values.

AUTHOR

COPYRIGHT AND LICENSE (The MIT License)

Copyright (c) 2011-2013 John Wang

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

4 POD Errors

The following errors were encountered while parsing the POD:

Around line 199:

'=item' outside of any '=over'

Around line 206:

You forgot a '=back' before '=head1'

Around line 208:

'=item' outside of any '=over'

Around line 213:

You forgot a '=back' before '=head1'

Module Install Instructions

To install Encode::Base58::GMP, simply copy and paste either of the commands in to your terminal

As a valued partner and proud supporter of MetaCPAN, StickerYou is
happy to offer a 10% discount on all Custom Stickers,
Business Labels, Roll Labels,
Vinyl Lettering or Custom Decals. StickerYou.com
is your one-stop shop to make your business stick.
Use code METACPAN10 at checkout to apply your discount.