Category Archives: Coding

Posts about coding and other software issues

Calculate MD5 programmatically (c++ and golang)

MD5 is 128 bit hash digest calculated by Message Digest Method 5 algorithm. It is not so secure as SHA-256 algorithm but significantly faster. It is still widely used as thumbprint to verify data integrity and detect accidental data corruption. Here is c++ example how to calculate MD5 hash of string using openssl API. Templates… Read More »

How to get openssl cipher list programmatically

The cipher list may be retrieved using “openssl cipher” command. This command has multiple options to filter output. The same is possible to do programmatically using openssl API. Here is c++ example how to programmatically obtain a list of available ciphers with appropriate cryptographic protocols they belong to. The code was implemented and tested on… Read More »

Openssl BIO API, file saving and reading examples

The acronym BIO stands for Basic Input/Output. It is multipurpose API for various types of input and output operations, including file, memory buffer, networking. The main header file for BIO methods is bio.h, binary linking references are presented in libcrypto.so library. Below presented 3 examples of BIO API file usage which create and read 3… Read More »

Create Frontend Development Environment Fast

I wrote this post for myself as quick reminder how to create web frontend ADE from scratch. Two components must be install VSCode and Node.js with npm (Node Package Manager). Both components may be installed on different operating systems: Windows, Mac or Linux. I was using Mac OSX. VSCode may be downloaded from

Changing Certificate Verification Flags in openssl

Recently I was needed to modify some flags for verification of X.509 public key certificates. These flags defined in x509_vfy.h include files. Particularly it was necessary to set X509_V_FLAG_X509_STRICT flag, which enables additional security checks and turns off workarounds for broken certificate chain. In other words this flag makes the certificate verification more strictly. This… Read More »

Rip Audio CD Programmatically

More than 10 years ago I started XEdit project which is binary editor for files and disks contents. XEdit is available there. I am still using it sometime, however I do not support the project since 2011 mainly because this MFC application was written on Visual C++ 6 and I have no time to do… Read More »

Installing swift on CentOS 8

Previously I worked with swift occasionally and using xCode only. There is my previous post with XML parser written in swift language. Here is my experience in swift installation on Linux platform with initial command line programming example. The first step – swift installation: It takes several minutes. Check swift version: # swift –version Swift… Read More »

Valgrind Testing of non Virtual Destructor

What is the purpose of Virtual Destructor? Sometime this question is asked on job interview. The main purpose of virtual destructor is to keep appropriate clean-up sequence when object is disposed. Deleting a derived class object which is casted to pointer of base class may be result of memory leak if base class destructor is… Read More »

snmpget in C#

SNMP (simple network management protocol) is the way to discover information about remote device or to monitor such device using agentless technique. The agentless approach means that no additional custom spy software is installed on target device. Anyware snmp or WMI are detective features, but usually they are part of operating system. Here is example… Read More »

Linux C error handling, errno and perror

If you have Java or .Net programming background you used to be familiar with exception which generated in runtime if something is going wrong with code execution. Linux C does not provide direct support to runtime error handling or exception handling. Usually code developer has to check return values from the functions. Generally C function… Read More »