Server IP : 213.176.29.180 / Your IP : 18.188.92.6 Web Server : Apache System : Linux 213.176.29.180.hostiran.name 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64 User : webtaragh ( 1001) PHP Version : 8.3.14 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home/webtaragh/public_html/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
PK Q�$Z3��n n php-client/behat.ymlnu �[��� # behat.yml default: context: parameters: user: password: base_url: driver: 'selenium2' paths: features: tests/integrations bootstrap: %behat.paths.features%/bootstrap extensions: Behat\MinkExtension\Extension: goutte: ~ selenium2: ~ phantomjs: context: parameters: user: password: base_url: driver: 'phantomjs' paths: features: tests/integrations bootstrap: %behat.paths.features%/bootstrap extensions: Behat\MinkExtension\Extension: goutte: ~ selenium2: wd_host: "http://localhost:8643/wd/hub" PK Q�$Z��� � php-client/build.xmlnu �[��� <?xml version="1.0" encoding="UTF-8"?> <project name="bitpay/package" default="build"> <target name="build" depends="lint,phpunit,phpcs" /> <target name="lint" description="Check the syntax of PHP files"> <mkdir dir="${project.basedir}/build/cache" /> <phplint cachefile="${project.basedir}/build/cache/phplint.cache"> <fileset dir="${project.basedir}/src"> <include name="**/*.php" /> </fileset> </phplint> </target> <target name="phpunit"> <delete dir="${project.basedir}/build/docs/code-coverage" /> <mkdir dir="${project.basedir}/build/docs/code-coverage" /> <exec executable="${project.basedir}/bin/phpunit" passthru="true"> <arg value="-c" /> <arg path="${project.basedir}/build" /> </exec> </target> <target name="phpcs"> <exec command="${project.basedir}/bin/phpcs ./src --standard=PSR1,PSR2 -n" passthru="true"> </exec> </target> <target name="build:docs" description="Build user documentation"> <exec executable="make" passthru="true" dir="${project.basedir}/docs"> <arg value="html" /> </exec> </target> </project> PK Q�$Z:G7 7 php-client/src/Bitpay/SinKey.phpnu �[��� <?php /** * @license Copyright 2011-2015 BitPay Inc., MIT License * see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE */ namespace Bitpay; use Bitpay\Util\Base58; use Bitpay\Util\Gmp; use Bitpay\Util\Util; /** * @package BitPay */ class SinKey extends Key { /** * Type 2 (ephemeral) */ const SIN_TYPE = '02'; /** * Always the prefix! * (well, right now) */ const SIN_VERSION = '0F'; /** * @var string */ protected $value; /** * @var PublicKey */ protected $publicKey; /** * @return string */ public function __toString() { return (string) $this->value; } /** * @param PublicKey * @return SinKey */ public function setPublicKey(PublicKey $publicKey) { $this->publicKey = $publicKey; return $this; } /** * Generates a Service Identification Number (SIN), see: * https://en.bitcoin.it/wiki/Identity_protocol_v1 * * @return SinKey * @throws \Exception */ public function generate() { if (is_null($this->publicKey)) { throw new \Exception('Public Key has not been set'); } $compressedValue = $this->publicKey; if (empty($compressedValue)) { throw new \Exception('The Public Key needs to be generated.'); } $step1 = Util::sha256(Util::binConv($compressedValue), true); $step2 = Util::ripe160($step1); $step3 = sprintf( '%s%s%s', self::SIN_VERSION, self::SIN_TYPE, $step2 ); $step4 = Util::twoSha256(Util::binConv($step3), true); $step5 = substr(bin2hex($step4), 0, 8); $step6 = $step3 . $step5; $this->value = Base58::encode($step6); return $this; } /** * Checks to make sure that this SIN is a valid object. * * @return boolean */ public function isValid() { return (!is_null($this->value) && (substr($this->value, 0, 1) == 'T')); } } PK Q�$Z���V� � "