I want to write data to a file but i want it to be written as
binary data so that no one could easily open the file and edit
it. The file will actually contain candidate names and ballot numbers so I prefer such data not to be in regular readable format.

Sample code anyone?

Any help will greatly be appreciated! Thanks.