2011-03-15

Using the Stopwatch class in C#

During the development of any kind of C# application you might find you need to measure how long some part of your code take to execute. Perhaps your customer demand an operation to finish in a maximum amount of time or you might be puzzled what part of a function is making it run slower than expected.

2011-03-09

XOR enciphering data for medium security

Sometimes when developing systems that involve sending or storing semi-sensitive data as a string there might not be an easy option or enough time to implement conventional encryption even though there might be some need to hide the contents of the data in some way. Such situations may include where you want to send scrambled messages between servers on the interwebs, store data in places where others may have access to it (on shared environments with nosy admins etc) or where you want to be able to easily unscramble data in something like javascript or some other language that lack libraries for conventional encryption.