public static function generate(EntityInterface $entity): ID
    {
        $headers = static::header($entity);
        return new ID(
            sprintf("%x%x%s", 
                $headers[0], 
                $headers[1],
                bin2hex(
                    random_bytes(15)
                )
            )
        );
    }
public static function generate(EntityInterface $entity): ID
    {
        $headers = static::header($entity);
        return new ID(
            sprintf("%x%x%s", 
                $headers[0], 
                $headers[1],
                bin2hex(
                    random_bytes(15)
                )
            )
        );
    }
public static function generate ( EntityInterface $ entity ) : ID { $ headers = static :: header ( $ entity ) ; return new ID ( sprintf ( "%x%x%s" , $ headers [ 0 ] , $ headers [ 1 ] , bin2hex ( random_bytes ( 15 ) ) ) ) ; }
Generates a cryptographically secure random ID for internal use.

Pho ID does not conform to UUID standards. It is similar to UUID v4,
however it does not use the same variants at same locations. Instead,
the first byte is reserved for entity type, and the remaining 15 is
used for randomness.

@link https://en.wikipedia.org/wiki/Universally_unique_identifier UUIDv4 format

@return ID  Random ID in object format.
Generates a cryptographically secure random ID for internal use .