Skip to content

vietstars/base58

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base58

Install

$ composer require vietstars/base58

Usage

$base58 = new Vietstars\Base58;

$encoded = $base58->encode(random_bytes(256));
$decoded = $base58->decode($encoded);

If you are encoding to and from integer use the implicit decodeInteger() and encodeInteger() methods.

$integer = $base58->encodeInteger(987654321); 
print $base58->decodeInteger("1TFvCj", true); 

Also note that encoding a string and an integer will yield different results.

$string = $base58->encode("987654321"); 
$integer = $base58->encodeInteger(987654321); 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages