diff --git a/src/CryptoCoin/CoinAddress.php b/src/CryptoCoin/CoinAddress.php index 1baeb38..54f1023 100644 --- a/src/CryptoCoin/CoinAddress.php +++ b/src/CryptoCoin/CoinAddress.php @@ -399,10 +399,10 @@ public static function create_key_pair() public static function base58check_encode($leadingByte, $bin, $trailingByte = null) { - $bin = chr($leadingByte) . $bin; + $bin = chr(intval($leadingByte)) . $bin; if ($trailingByte !== null) { - $bin .= chr($trailingByte); + $bin .= chr(intval($trailingByte)); } $checkSum = substr(hash('sha256', hash('sha256', $bin, true), true), 0, 4); $bin .= $checkSum;