Use a unique encoding for keys

I don't think Key.String() is not guaranteed to be unique since its ID
could contain other key ids. Key.Encode() should be safer.