src/Phpass/Hash/Adapter/ExtDes.php
protected function _decodeInt24($source)
    {
        if (strlen($source) != 4) {
            throw new InvalidArgumentException('Source must be exactly 4 bytes');
        }

        $integer  = strpos($this->_itoa64, $source{0});
        $integer += (strpos($this->_itoa64, $source{1}) << 0x06);
        $integer += (strpos($this->_itoa64, $source{2}) << 0x0c);
        $integer += (strpos($this->_itoa64, $source{3}) << 0x12);

        return $integer;
    }
protected function _decodeInt24($source)
    {
        if (strlen($source) != 4) {
            throw new InvalidArgumentException('Source must be exactly 4 bytes');
        }

        $integer  = strpos($this->_itoa64, $source{0});
        $integer += (strpos($this->_itoa64, $source{1}) << 0x06);
        $integer += (strpos($this->_itoa64, $source{2}) << 0x0c);
        $integer += (strpos($this->_itoa64, $source{3}) << 0x12);

        return $integer;
    }
protected function _decodeInt24 ( $ source ) { if ( strlen ( $ source ) != 4 ) { throw new InvalidArgumentException ( 'Source must be exactly 4 bytes' ) ; } $ integer = strpos ( $ this -> _itoa64 , $ source { 0 } ) ; $ integer += ( strpos ( $ this -> _itoa64 , $ source { 1 } ) << 0x06 ) ; $ integer += ( strpos ( $ this -> _itoa64 , $ source { 2 } ) << 0x0c ) ; $ integer += ( strpos ( $ this -> _itoa64 , $ source { 3 } ) << 0x12 ) ; return $ integer ; }
Decode a 24-bit integer encoded as a 4-byte string.

@param string $source
The source string to decode.
@return integer
Returns the decoded integer.
@throws InvalidArgumentException
Throws an InvalidArgumentException if the source string is not exactly
4 bytes.
Decode a 24 - bit integer encoded as a 4 - byte string .