Hashes and Strings in Go

Introduction In a few cases while working on Go software, I have needed to generate a cryptographic hash (mainly SHA-256) from a string or JSON value. In all cases up to this point, I needed to convert the resulting []byte to a string representation for storage or viewing. In my investigation, I found two popular ways to approach this problem. I’ll describe them below as well as explore the performance implications of each choice....

December 22, 2021 · 3 min · michaelpeterswa