move rng to platform so it can be easily adapted/replaced in that context
add place to return the token at creation time