-
-
13 May 2022 20:30:43 UTC
- Distribution: Bitcoin-Crypto
- Module version: 1.006
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues
- Testers (82 / 0 / 1)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (59.96KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Bitcoin::Crypto::Base58 - Bitcoin's Base58 helpers
SYNOPSIS
# none exported by default use Bitcoin::Crypto::Base58 qw( encode_base58 decode_base58 encode_base58check decode_base58check ); my $b58str = encode_base58check(pack "A*", "hello"); my $bytestr = decode_base58check($b58str);
DESCRIPTION
Implementation of Base58Check algorithm and alias to CryptX
encode_b58b
/decode_b58b
FUNCTIONS
This module is based on Exporter. None of the functions are exported by default.
:all
tag exists that exports all the functions at once.encode_base58
decode_base58
Basic base58 encoding / decoding.
Encoding takes one argument which is byte string.
Decoding takes base58-encoded string
These two functions are just aliases to "encode_b58b" in Crypt::Misc and "decode_b58b" in Crypt::Misc with some error checking.
encode_base58check
decode_base58check
Base58 with checksum validation. These functions are used with Bitcoin legacy / compatibility addresses.
Arguments are the same as base functions mentioned above.
Additional errors (other than illegal characters) are thrown.
EXCEPTIONS
This module throws an instance of Bitcoin::Crypto::Exception if it encounters an error. It can produce the following error types from the Bitcoin::Crypto::Exception namespace:
Base58InputFormat - input was not suitable for base58 operations due to invalid format
Base58InputChecksum - checksum validation has failed
SEE ALSO
Module Install Instructions
To install Bitcoin::Crypto, copy and paste the appropriate command in to your terminal.
cpanm Bitcoin::Crypto
perl -MCPAN -e shell install Bitcoin::Crypto
For more information on module installation, please visit the detailed CPAN module installation guide.