Category Archives: TypeScript

JavaScript: SHA-256 Implementation

October 3rd, 2021
Posted in TypeScript | No Comments

This weekend I decided to experiment with using JavaScript to implement client-side processing of files using a web browser. To make it interesting, I wanted to see if it was possible to implement a cryptographically strong hash function: SHA-256. This exercise gave me exposure to Web Workers and the Stream API. I encountered compatibility challenges. […]

TypeScript: readonly vs. const

March 10th, 2020
Posted in TypeScript | No Comments

From The TypeScript Handbook: The easiest way to remember whether to use readonly or const is to ask whether your using it on a variable or a property. Variables use const whereas properties use readonly.