![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/gositeme.com/public_html/whmcs/vendor/bitpay/php-client/src/Bitpay/ |
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/
namespace Bitpay;
/**
* Object to represent a point on an elliptic curve
*
* @package Bitcore
*/
class Point implements PointInterface
{
/**
* MUST be a HEX value
*
* @var string
*/
protected $x;
/**
* MUST be a HEX value
*
* @var string
*/
protected $y;
/**
* @param string $x
* @param string $y
*/
public function __construct($x, $y)
{
$this->x = (string) $x;
$this->y = (string) $y;
}
/**
* @return string
*/
public function __toString()
{
if ($this->isInfinity()) {
return self::INFINITY;
}
return sprintf('(%s, %s)', $this->x, $this->y);
}
/**
* @return string
*/
public function getX()
{
return $this->x;
}
/**
* @return string
*/
public function getY()
{
return $this->y;
}
/**
* @return boolean
*/
public function isInfinity()
{
return (self::INFINITY == $this->x || self::INFINITY == $this->y);
}
/**
* @inheritdoc
*/
public function serialize()
{
return serialize(array($this->x, $this->y));
}
/**
* @inheritdoc
*/
public function unserialize($data)
{
list(
$this->x,
$this->y
) = unserialize($data);
}
}