Use SecureRandom instead of rand