Hashing Tutorial by Using Microsoft Cryptographic Service Providers
Hashing is an algorithm used to produce a hash value of some piece of data, such as a message or session key. Typical hashing algorithms include MD2, MD4, MD5, SHA-1 and SHA-2. This tutorial will guide you through the steps to create a Win32 console based sample application, which consists of cryptographic hashing function, by using Microsoft Cryptographic Service Providers (CSP). Continue reading »
Learn SQLite in 1 hour
1. Introduction
SQLite is an open source, embedded relational database which implements a self-contained, serverless, zero-configuration,transactional SQL database engine. SQLite has a well-deserved reputation for being highly portable, easy to use, compact, efficient, and reliable. Unlike client–server database management systems, installing and running of SQLite database is pretty straightforward in most cases — just make sure the SQLite binaries file exists anywhere you want and start to create, connect, and using the database. If you are looking for an embedded database for your projects or solutions, SQLite is definitely worth considering.
C++ SQLite Example with Parameterized Query
You might know the benefits of using parameterized query (e.g boost query performance in term of speed, avoid SQL injection attack, etc) but how it can be done in programming way might sound like a different story to you.Using OpenSSL Cryptography: Blowfish, DES, RC2, RC4
If you are looking for a cryptography solutions in your project, whether it is Blowfish, DES, RC2 or RC4, perhaps, you can consider to utilize the crypto library which is provided by openssl. In this tutorial, i am going to show you how it can be easily implemented into the C++ project solution.
Continue reading »
Configure Visual C++ Projects to Target 64-Bit Platforms
This tutorial describes how to setup project configuration in Visual C++ IDE in order to develop 64-bit applications. I am using a free version of Visual C++ 2010 Express in this tutorial. Visual C++ 2010 Express does not include a 64-bit compiler, we will need to install Windows 7 SDK in order to make it available in the IDE. The following the steps will guide you on how to configure your machine and IDE to develop 64-Bit application.
Continue reading »
C++ SQLite Example with Atomic Transaction
Wonder how you can implement an automic transaction in SQLite so that your queries will either completely occurs, or completely fails to occur. In this tutorial, i will demonstrate how you can do that in your C++ code by modifying my previous C++ Sqlite example. My previous C++ Sqlite tutorials can be found at the following links:
Continue reading »
Compiling and Installing OpenSSL for 32 bit Windows
What is OpenSSL?
@Wikipedia: “OpenSSL is an open-source implementation of the SSL and TLS protocols. The core library, written in the C programming language, implements the basic cryptographic functions and provides various utility functions.”
Enough for the explanation of OpenSSL. Using Transcation in C++ PostgreSQL Example
There are times when you need to execute a series of SQL statements in order to achieve data consistency. For example, a customer is going to transfer his money from bank account to settle a bill payment. We will need to update both customer bank account and payee account accordingly. Failure to update either custormer account or payee account will cause data inconsistent.
A transaction can be constructed to avoid data inconsistency caused by such failure. A transaction is a set of one or more statements that is executed as a unit, so either all of the statements are executed, or none of the statements is executed.
Continue reading »
C++ PostgreSQL Example in Linux
In this tutorial, i’ll demonstrate an example on how to connect to PostgreSQL database using gcc in linux. Also, i’ll demonstrate some basic SQL execution in the C++ example so that it give better understading to you how all of these are working.
If you are looking a tutorial for windows platform, you could visit the following link which demonstrate the tutorial for windows platform. C++ PostgreSQL Example in Windows
Continue reading »
Get total seconds in C#
Sometimes you might want to knon how much time will it take to execute a certain process in C#. Here is a simple example to demonstrate how you can achieve this by using the TimeSpan attribute.
1 2 3 4 5 6 7 8 9 10 11 12 13 | // clock the start time DateTime start_time = DateTime.Now; // To-do: Add you process here. // clock the end time DateTime end_time = DateTime.Now; // get total seconds spend on the process var total_seconds = (end_time - start_time).TotalSeconds; // print the output Console.WriteLine("Total seconds spent: {0}", total_seconds); |
Recent Posts
- Hashing Tutorial by Using Microsoft Cryptographic Service Providers
- Learn SQLite in 1 hour
- C++ SQLite Example with Parameterized Query
- Using OpenSSL Cryptography: Blowfish, DES, RC2, RC4
- Configure Visual C++ Projects to Target 64-Bit Platforms
- C++ SQLite Example with Atomic Transaction
- Compiling and Installing OpenSSL for 32 bit Windows
- Using Transcation in C++ PostgreSQL Example
- C++ PostgreSQL Example in Linux
- Get total seconds in C#



