The Kenyan shilling (KSh) trades against most international currencies at a favourable rate. There’s no need to bring large amounts of hard currency cash or to buy shillings in advance.
Major international credit/debit cards (for instance Master and Visa) can be used to draw local currency at 24-hour ATMs in most cities and beach resorts, but not in national parks and other safari destinations).
Many vendors do not accept cards, however, so it’s a good idea to carry a few hundred dollars’ worth of hard currency cash as a fall back.