3 ms·
RFC 6920: Naming Things with Hashes
- h4l 3y agoInteresting, I'd not known of this RFC before. Another example of a content-addressed data store could be OCI registries (more commonly known as container image registries). Using them to store arbitrary artefacts is quite well supported now: https://oras.land/ https://oras.land/
- 38 3y agohere is an implementation in Go for fun: package rfc6920 import ( "crypto/sha256" "encoding/base64" ) func rfc6920(s string) string { sum := sha256.Sum256([]byte(s)) return base64.RawURLEncoding.EncodeToString(sum[:]) }