code: private static function setParityBit($byte)
      {
          $parity = 1;
  
          for ($i = 1; $i < 8; $i++) {
              $parity = ($parity + (($byte >> $i) & 1)) %2;
          }
  
          $byte = $byte | ($parity & 1);
  
          return $byte;
      }
docs: Set an odd parity bit for a given byte, in least-significant position.
  
  @link https://github.com/jclulow/node-smbhash/blob/edc48e2b/lib/common.js
  Implementation basis.
  @param int $byte An 8-bit byte value.
  @return int An 8-bit byte value.