When it comes to licensing software that is installed on an end user’s device, one of the most secure approaches that we can take as software developers, is to generate and subsequently validate a digitally signed license. With this approach, a cryptographically secure public/private key pair is created that is specific to the software being…
Tag: C#
NCache is an open-source, in-memory, distributed cache written in .NET and usable by several different languages and frameworks. A distributed cache pools together memory from one or more servers into a single data store that can be accessed from a consuming application that is typically hosted on another server. The cache can be used to…
Cake (C# Make) provides a wonderfully straightforward and extensible means of automating your software builds. In my previous article, I provided some background on what Cake is and how to get started with it. I walked through how to set up Cake on your system and how to create and run your first build script….
Fancy some Cake? While cakes in all their forms are usually a delicious treat, the Cake I’m referring to is a build automation system written in C#. Nonetheless, if you haven’t used Cake before I’m sure you’ll find it just as sweet an experience! Let’s dive right in with a definition of Cake, taken from…
Security is an implicit requirement in practically every software application. As a software developer, it is very important to be aware of the security implications of any code that you write, ensuring that you are protecting users and their data. Many applications need to make use of secure random strings for various purposes. One of…
The SecureString class is a .NET type that provides an increased level of security for sensitive in-memory data. Having said that, the security benefits of SecureString have been widely debated. The general consensus is that SecureString can help to increase application security if used properly, however, the inherent advantages are somewhat limited in scope. Despite…
Sometimes when embarking on a software project you may find yourself wishing that you had a lightweight way of achieving Inversion of Control (IoC) via dependency injection. On the other hand, you might not be very familiar with the principle of IoC, but have heard it can be very beneficial and are looking for a…
SQL injection is a common attack vector that remains one of the most prevalent security risks for applications today. One of the reasons SQL injection attacks are so pervasive is the fact that injection vulnerabilities are very easy for attackers to discover and exploit, sometimes with devastating consequences. On the other hand, mitigating SQL injection…
Tuples are a very useful feature of the C# language; they allow more than one value to be grouped and passed back and forth without needing to define additional types. As we’ll discover later in this article, tuples are particularly convenient for returning more than one value from a method, avoiding the need for ugly…