Whisk the egg yolks together in a medium size bowl and set next to the stove.
In a medium size saucepan, off the heat, stir together the sugar, salt and the cornstarch. Set it aside too.
If using the vanilla bean, pry it open with the tip of a knife and scrape its insides into a second medium saucepan. Add the vanilla bean pod and the milk and cream and heat over medium until mixture starts to steam. If you are not using the vanilla bean, you can skip this step.
Remove the vanilla bean pod from the milk and drizzle milk into the sugar mixture. Set the sugar mixture over medium heat and whisk until smooth. It will start to thicken just a little from the cornstarch at this point, but won't be fully thickened because you have to add those yolks.
Remove the hot milk mixture from the heat and stir about ¼ cup of the hot milk mixture into the yolks, then scrape the yolk mixture into the saucepan. Return to heat and bring to a gentle boil, stirring constantly until the custard becomes thick and smooth.
Transfer the pastry cream to a clean bowl. If you did not use a vanilla bean and are using vanilla, stir that in now. Press a piece of plastic wrap to the surface and chill until cold.