public static function rawToHex($raw, $length = 0)
    {
        $gmp = gmp_import($raw);
        $hex = gmp_strval($gmp, 16);

        return self::pad($hex, $length);
    }
public static function rawToHex($raw, $length = 0)
    {
        $gmp = gmp_import($raw);
        $hex = gmp_strval($gmp, 16);

        return self::pad($hex, $length);
    }
public static function rawToHex ( $ raw , $ length = 0 ) { $ gmp = gmp_import ( $ raw ) ; $ hex = gmp_strval ( $ gmp , 16 ) ; return self :: pad ( $ hex , $ length ) ; }
Converts stream of bytes into hexadecimal string.

@param mixed $raw    Stream of bytes.
@param int   $length Minimum output length.

@return string Hex string.
Converts stream of bytes into hexadecimal string .