Plurrrr

Mon 04 Apr 2022

Go Generics for Field Level Database Encryption

I have been working on a project that needs a rest API with a SQL database. The API creates, updates and retrieves objects from the database; such as:

  • user information
  • transactions
  • user accounts
  • credit card details
  • other

This project has some specific data security requirements for storage. We needed to encrypt certain fields on these data tables using a different encryption key per user and per account. The biggest challenge was building a Go library to support this sort of complex per field encryption. I wanted to make a nice way of encrypting and decrypting a Go struct without adding verbose code in the API. There needed to be a simple way of managing the many different encryption keys that will be handled in each API request.

Source: Go Generics for Field Level Database Encryption, an article by Josh Wales.

Some thoughts on Go's unusual approach to identifier visibility

The obvious nice thing about Go's approach is that you're never in doubt about whether an identifier is public or not when you read code. If it starts with upper case, it's public; otherwise, it's package private. This doesn't mean that a public identifier is supposed to be used generally, but at least it's clear to everyone that it could be. In other languages, you may have to consult the definition of the identifier, or perhaps a section of code that lists exported identifiers.

Source: Some thoughts on Go's unusual approach to identifier visibility, an article by Chris Siebenmann.

Those HTML Attributes You Never Use

But there is a whole bunch of lesser-used attributes that I was sure I’d forgotten about, and probably a whole bunch of attributes I didn’t even know existed. This post is the result of my research, and I hope you’ll find some of these useful to you, as you build HTML pages in the coming months.

Source: Those HTML Attributes You Never Use, an article by Louis Lazaris.