Add character count to output. Change random generator to be more cryptographically secure.