Move away from the random string api.

Also removes the csprng from places where it's probably not necessary.

Maybe @Sc00bz can review?