Secure Instant Messaging — 5 April 2021
3DES File Encryption (C#) — 4 April 2021

3DES File Encryption (C#)

In cryptography, Triple DES (3DES or TDES) is a symmetric-key block cipher, which applies the DES cipher algorithm three times to each data block.

https://en.wikipedia.org/w/index.php?title=Triple_DES&oldid=995820064

To use 3DES functionality first off all we need to include “System.Security.Cryptography”.

using System.Security.Cryptography;

Then we should create and adjust an object which will do encryption:

var tdese = TripleDES.Create();
tdese.Mode = CipherMode.ECB;
tdese.Padding = PaddingMode.PKCS7;
tdese.Key = ConvertHexStringToByteArray("AABBCCDDEE11223344556677889900FF");
var encryptor = tdese.CreateEncryptor();

“ConvertHexStringToByteArray” function to convert hex string to byte array:

  public static byte[] ConvertHexStringToByteArray(string hexString)
  {
            if (hexString.Length % 2 != 0)
            {
                throw new ArgumentException(String.Format(CultureInfo.InvariantCulture, "The binary key cannot have an odd number of digits: {0}", hexString));
            }

            byte[] HexAsBytes = new byte[hexString.Length / 2];
            for (int index = 0; index < HexAsBytes.Length; index++)
            {
                string byteValue = hexString.Substring(index * 2, 2);

                if (byteValue == "  ")
                {
                    HexAsBytes[index] = Convert.ToByte("32");
                }
                else
                {
                    HexAsBytes[index] = byte.Parse(byteValue, NumberStyles.HexNumber, CultureInfo.InvariantCulture);
                }
            }

            return HexAsBytes;
  }

Source code below shows how to use object “encryptor” to encrypt the file “FileToEncrypt.txt”.

byte[] result = null;
byte[] data = File.ReadAllBytes("FileToEncrypt.txt");
using (var mse = new MemoryStream())
   {
      using (var cs = new CryptoStream(mse, encryptor, CryptoStreamMode.Write))
                            cs.Write(data, 0, data.Length);

      result = mse.ToArray();
   }

if (result != null)
   {
      string encrypteddata = UTF8Encoding.Default.GetString(result);
      File.AppendAllText("OutputFileName" + ".enc", encrypteddata, UTF8Encoding.Default);
   }

With this code we can store our file “FileToEncrypt.txt” encrypted as “OutputFileName.enc”. Decryption can be done with “tdese.CreateDecryptor();”.

Arduino Wifi Setup —

Arduino Wifi Setup

A IoT device programmed with Arduino need connect to WiFi at start of device to use internet for data transfer etc. First of all we need to include header file “WiFiClient” to our sketch.

#include <WiFiClient.h>

With code below we will let user enter WiFi credentials over serial communication. we should add this code to our setup() part of our Arduino sketch.

Serial.write("Please enter name of your wifi network\n");
while(Serial.available() == 0){};
String Uid=Serial.readStringUntil('\n');

Serial.write("Please enter password of your wifi network\n");
while(Serial.available() == 0){};
String pass= Serial.readStringUntil('\n');

If you want give user a tool to setup WiFi over serial you can download a free serial communication tool “Vengito Serial Tool”. With this tool user can connect IoT device easily and enter WiFi credentials.

After user entered credentials device should try connecting to internet. Code below have 3 parts and also should be in setup() part of our sketch. First part disconnects from any WiFi network if it is connected already. Second part starts connection with Wifi.begin function. And the last part waits connecting and gives IP address of device over serial port if device connected WiFi successfully.

WiFi.disconnect();
delay(1000);
  
WiFi.begin(Uid, pass); //begin WiFi connection
Serial.println("Started");
unsigned long startedWaiting = millis();
   
// Wait for connection
while (WiFi.status() != WL_CONNECTED && millis() - startedWaiting <= 25000) 
  {
    delay(500);
    Serial.print("*");
  }
  
if(WiFi.status() != WL_CONNECTED)
  {
	Serial.print("IP address: ");
	Serial.println(WiFi.localIP());
  }

You can try this code with ESP8266 or any other chip which supports Arduino.

LabVIEW Example Videos _ Part 1 — 2 April 2021
How to do Simulations with Scilab Xcos Tutorial Video _ Part 1 —
Monitor Temperature, Humidity, Fire and Smoke of Room — 31 March 2021

Monitor Temperature, Humidity, Fire and Smoke of Room


RoomLog measures ambient temperature and humdity.According to setted min and max values RoomLog sends email (if enabled) and activates 3.3V digital outputs. RoomLog also checks fire and smoke.If RoomLog detects fire or smoke, it sends email and activates 3.3V digital outputs.

  • Monitor ambient temperature and humidity
  • Check fire and smoke around
  • 3.3V Alarm Output for Temp., Humidity, Fire and Smoke
  • Sends Alarm Emails
  • Linux OS
File Privacy — 30 March 2021
10 Volt Sensor and Ambient Measurement with 3.3 Volt Alarm Outputs — 21 March 2021

10 Volt Sensor and Ambient Measurement with 3.3 Volt Alarm Outputs

After calibrating and setting maximum and minimum limits this device gives 3.3V output if limit exceeded. It has 4 sensor connections available and accordingly has four 3.3V digital output connections. Raw sensor value will be multiplied with a constant value and an other constant value will be added to have calibrated value. This calibrated sensor value will be compared with setted limits for decision of 3.3V outputs.

• Four ±10V Sensor Input
• Four 3.3V Alarm Output
• Monitor ambient temperature and humidity
• Linux OS


24 Volt Digital Counter for Production Monitoring —

24 Volt Digital Counter for Production Monitoring

ProduLog — Machine Monitoring System
• Devices on Wi-Fi network will found automatically
• Every device gets a label
• 4 counter per device (24V Input)
• Monitor counters online
• Generate daily and monthly reports at any time
• Automatically sending reports via mail
• Data logging customizable in minute or hour
• Track history of counters
• 200 Counter (50 device) per server


Convert Files — 18 March 2021

Convert Files


Convert Files has following features: 

  • Convert pdf files to text files 
  • Convert xlsx files to csv files
  • Convert bmp files to jpg files and vice versa
  • Convert bmp files to png files and vice versa
  • Convert png files to jpg files and vice versa
  • Convert mp3 files to wav files and vice versa 
  • Convert mp3 files to wma files and vice versa
  • Convert wav files to wma files and vice versa 
  • Convert mp4 files to avi files and vice versa
  • Convert mp4 files to wmv files and vice versa 
  • Convert avi files to wmv files and vice versa
Password List Generator — 17 March 2021
CRM 365 Tool — 15 March 2021
Create your website with WordPress.com
Get started