is a free cryptographic library which might suffice
you should provide a key, gather the information, and simply write it encrypted to a file (if not exists. after that read and compare). If the content of the file is wrong or not existent your program ends.