NOTE: This post is a little dated, as it does not make use of features in newer releases.
There is a huge number of C libraries that provide functionality that would be very useful in an application. One way to access this functionality from Tcl is to write a binding using Tcl's C API. This requires fairly detailed knowledge of both C as well as Tcl's API. An alternative is to use a Foreign Function Interface extension for Tcl such as cffi or Ffidl.
The use of the Transport Layer Security (TLS, formerly known as SSL) is becoming increasingly prevalent to secure network communication, particularly with the browser and search companies pushing web sites to move to HTTPS instead of HTTP. This post discusses the options for using TLS over Tcl sockets and specifically some important potential pitfalls to keep in mind with respect to certificate validation. The discussion is limited to client-side operation.
There is plenty of reference material on the Internet about building single file applications with Tcl but as is often is the case, some bit rot has set in that makes it confusing for new users. Taking a break from our series on Tcl 8.7, this short post aims to remedy that by providing a step-by-step guide for the process.
In my previous post, I described how to connect to Bluetooth devices from Tcl. That however only went as far as discovering devices and establishing network connections and left unanswered the question of what you do next once a connection is established. This post, and succeeding ones, will build on that by showing how you can transfer files, contact information etc. to Bluetooth devices from Windows using the OBEX protocol.
Taking a break from our series on Tcl 8.7 features, this post is about Bluetooth; in particular, how to discover and connect to services offered by Bluetooth devices.
Windows can send notifications to applications advising them of changes in device configuration. The most common manifestation of this is file managers popping up a window showing the contents of a USB pen drive when it is plugged in and automatically closing it when the drive is ejected. This post describes how to hook into these notifications within a Tcl application.
The latest post in our series on promises introduced the async and await commands. That post focused on how these commands further simplify asynchronous programming with promises. This post takes a different angle on their utility - how they can be used to speed up sequential code with minimal effort.
What is metaprogramming? Roughly speaking, metaprogramming involves writing a program that in turn writes a program to do the desired task. In some cases metaprogramming makes for simpler or more succinct code while in others it optimizes performance by generating specialized code at runtime. Tcl lends itself naturally to this style of programming. This article illustrates one such use.
Having gone through several introductory posts covering background material such as CSP's, contexts, key containers and methods of key generation, we are now ready to delve into the actual cryptographic operations that use symmetric algorithms in detail.
In a prior post, I described the use of Windows CryptoAPI to compute message digests and message authentication codes which ensure integrity of messages. We now move on to the use of symmetric algorithms in cryptography, which can be used for both message confidentiality and integrity. Asymmetric algorithms will be covered in future posts. Refer to the introductory post in this series for the difference between the two.