Generics aren't helping us here.

Also removing encodeKey, intended to wrap byte arrays and such, in favor
of configuring an "equivalence class".
Handle byte-array keys correctly