Prevent mistake when the serialization is not done properly, for example missing the padding when necessary.
adapt CPRG to MonadRandom