Interfaces and implementations for sources of randomness and pseudo-randomness