Fixed indents, implemented SecureRandom.