}
$bytestring = substr($details, 5);
- $bytes = '';
- foreach (explode(' ', $bytestring) as $strbyte) {
- $bytes .= chr(hexdec($strbyte));
- }
+ $bytes = static::getBytesFromHexString($bytestring);
$msgtype = $bytes{7};
static $interestingTyps = array(
}
}
+ public static function getBytesFromHexString($bytestring)
+ {
+ $bytes = '';
+ foreach (explode(' ', $bytestring) as $strbyte) {
+ $bytes .= chr(hexdec($strbyte));
+ }
+ return $bytes;
+ }
+
protected function prepareDump()
{
if ($this->config->dumpFile === null) {