Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ionux/php-bitcoin-hash-utils

A PHP class consisting of Bitcoin-related hash & encoding functions.
https://github.com/ionux/php-bitcoin-hash-utils

Last synced: 6 days ago
JSON representation

A PHP class consisting of Bitcoin-related hash & encoding functions.

Awesome Lists containing this project

README

        

php-bitcoin-hash-utils
======================

A PHP class consisting of Bitcoin-related hash & encoding functions.

Functions include:

- BASE-58 encoding and decoding
- Standard hex encoding and decoding
- Converting a RIPEMD-160 hash to address and address to hash
- Converting a public key to an address

Usage
-----
The class consists of static functions so creating a new object from this class is not needed. Simply include() the class file in the head of your PHP script and call the needed function.

For example:


include_once('class.BitcoinHashUtils.php');
$WIF_address = BitcoinHashUtils::encodeBase58($hex_string);

Version
--------
- 2/12/2014, [email protected]:
- Converted to class format, cleaned up a bit and some
- error checking code. Also added extension checks for
- BC Math or GMP and uses either method for calculations.

License
-------



Public Domain Mark



This work, based upon code by unknown and enhanced by Rich Morgan, is free of known copyright restrictions.

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.