I hereby claim:
- I am natmchugh on github.
- I am natmchugh (https://keybase.io/natmchugh) on keybase.
- I have a public key whose fingerprint is 1807 554C EDC9 A540 CEBA B189 53CA 1AC2 5751 A4A8
To claim this, I am signing this object:
<?php | |
class A { | |
function callByRef(&$var) { | |
$var->foo = 'bar'; | |
$var = new stdclass; | |
$var->baz = 'bat'; | |
} | |
function callOnObject($var) { |
/** | |
* getConfirmedDeliveryDate | |
* | |
* @return void | |
*/ | |
public function getConfirmedDeliveryDate() | |
{ | |
return $this->_confirmedDeliveryDate; | |
} |
<?php | |
function changeMessage($ip, $msg) | |
{ | |
$fp = fsockopen($ip, 9100, $errno, $errstr, 5); | |
if (!$fp) { | |
echo "$errstr ($errno)"; | |
} else { | |
$string = "\x1B%-12345X@PJL RDYMSG DISPLAY = \"".$msg."\"\r\n\x1B%-12345X\r\n"; | |
fwrite($fp, $string); |
<?php | |
require (__DIR__.'/../vendor/autoload.php'); | |
use Guzzle\Http\Client; | |
use Fishtrap\Guzzle\Plugin\OAuth2Plugin; | |
use Guzzle\Log\MessageFormatter; |
<?php | |
define('π', M_PI); | |
var_dump(π); |
<?php | |
/* | |
Note 1: All variables are unsigned 32 bits and wrap modulo 232 when calculating, except | |
ml the message length which is 64 bits, and | |
hh the message digest which is 160 bits. | |
Note 2: All constants in this pseudo code are in big endian. | |
Within each word, the most significant byte is stored in the leftmost byte position | |
*/ |
<?php | |
function preProcess($message) { | |
$message .= chr(128); | |
while (((strlen($message) + 8) % 64) !== 0) { | |
$message .= chr(0); | |
} | |
return $message; | |
} |
I hereby claim:
To claim this, I am signing this object:
<?php | |
$hashes = []; | |
$count = 0; | |
while (true) { | |
$randBytes = openssl_random_pseudo_bytes(100); | |
++$count; | |
$hash = hash('md5', $randBytes); | |
$smallerHash = substr($hash, 0, 8); | |
if (isset($hashes[$smallerHash])) { |
<?php | |
//Pre-processing: adding a single 1 bit | |
// append "1" bit to message | |
// Notice: the input bytes are considered as bits strings, | |
// where the first bit is the most significant bit of the byte.[46] | |
//Pre-processing: padding with zeros | |
// append "0" bit until message length in bits ≡ 448 (mod 512) | |
function preProcess($message) { | |
// $message .= chr(128); |