Beispiel #1
0
 /**
  * Parse binary data
  *
  * @param string $binaryData The binary data
  */
 public function parseBinary($binaryData)
 {
     $unpackMask = "a" . TAC_PLUS_HDR_SIZE . "header/a*body";
     $binData = unpack($unpackMask, $binaryData);
     $this->header->parseBinary($binData['header']);
     $pad = $this->header->getPseudoPad($this->secret);
     if ($this->header->isEncrypted()) {
         $binBody = $binData['body'] ^ $pad;
     } else {
         $binBody = $binData['body'];
     }
     $reply = $this->body->parseBinary($binBody);
 }