About two years ago, I made a web-based web-application for keeping my personal diary in Silverlight for personal use. For those who need it, I want to share my decision.
I know from personal experience that the main function of a diary is to quickly add a small new record (rereading the diary happens every two years). And, of course, it is extremely important to ensure confidentiality.
The application has only the client part, the data itself is not stored on the Internet. In fact, the application is a specialized editor of local files with the ability to automatically encrypt and add metadata to records.
')
You can try it in action here:
www.kalantyr.ru/Diary without any registrations.
Data synchronization between computers (bicycle) decided not to reinvent and synchronize the data file simply via DropBox. Or you can carry it with you on a flash drive - as you prefer.
Anticipating doubts: maybe someone will say that now the application does not send anything anywhere, but in a couple of months it will quietly start ... If anyone needs it, I can send the source code, I don’t feel sorry. Or simply ready-compiled xap-module - lay out on your hosting and use on health.
Here are screenshots for those who do not want to install Silverlight:
dl.dropbox.com/u/5681766/Habr/Diary/01.PNGdl.dropbox.com/u/5681766/Habr/Diary/02.PNGdl.dropbox.com/u/5681766/Habr/Diary/03.PNGdl.dropbox.com/u/5681766/Habr/Diary/04.PNGdl.dropbox.com/u/5681766/Habr/Diary/05.PNGdl.dropbox.com/u/5681766/Habr/Diary/06.PNGOne of the features that were important to me are tags. And the tag for me is not just a word, but a Name + Description. For example, a tag can describe a person, and in the Description add his contact information.
As time goes by, technologies change to make it easier to switch from Silverlight to something more relevant - the functions of export / import data through regular xml files are implemented.
If you need to find something in thousands of records, there is filtering of records by tags / substring / date.
There is another non-obvious feature - when someone is behind him, you can, by pressing the “plus” or “minus” buttons on the numeric keypad, change the contrast of the text, making it unreadable over the shoulder :)
About confidentiality: data from the browser is not transmitted anywhere; when you save it to a file, data is encrypted with AES:
private static byte[] Encrypt(IList<byte> key, byte[] data) { using (var encryptor = new AesManaged()) { encryptor.GenerateIV(); encryptor.IV = GetKey(key, encryptor.IV.Length); encryptor.GenerateKey(); encryptor.Key = GetKey(key, encryptor.Key.Length); using (var encryptionStream = new MemoryStream()) using (var encrypt = new CryptoStream(encryptionStream, encryptor.CreateEncryptor(), CryptoStreamMode.Write)) { encrypt.Write(data, 0, data.Length); encrypt.FlushFinalBlock(); encrypt.Close(); return encryptionStream.ToArray(); } } } private static byte[] Decrypt(IList<byte> key, byte[] data) { try { using (var decryptor = new AesManaged()) { decryptor.GenerateIV(); decryptor.IV = GetKey(key, decryptor.IV.Length); decryptor.GenerateKey(); decryptor.Key = GetKey(key, decryptor.Key.Length); using (var decryptionStream = new MemoryStream()) using (var decrypt = new CryptoStream(decryptionStream, decryptor.CreateDecryptor(), CryptoStreamMode.Write)) { decrypt.Write(data, 0, data.Length); decrypt.Flush(); decrypt.Close(); return decryptionStream.ToArray(); } } } catch (CryptographicException) { throw new InvalidOperationException(" ."); } } private static byte[] GetKey(IList<byte> value, int keyLength) { var data = new byte[value.Count * keyLength]; for (var i = 0; i < data.Length; i++) data[i] = value[i % value.Count]; var key = new byte[keyLength]; for (var i = 0; i < key.Length; i++) key[i] = data[i]; return key; }
Update:
Here is a compiled application to run on a local computer (without the Internet):
dl.dropbox.com/u/5681766/Habr/Diary/Diary.zipUpdate 2:
But the source:
dl.dropbox.com/u/5681766/Habr/Diary/Diary_SourceCode.zip