Open jyasskin opened 4 days ago
It's the latter, and the presumption here is that human readable documentation for the cryptosuite library clearly defines what input types it supports. I could add a comment to that effect (and try to figure out how to align the input options so they're used in the algorithms), but at this point, I'm questioning if we should just say that it's up to the library author to pick one or both and understanding what the library supports is implementation specific and requires the implementer to read the library documentation?
Thoughts on what you'd prefer here, @jyasskin?
If you handle #1518 by parsing to an Infra map early, then I think it's easiest to have the securing specs take that map. Otherwise, you could have the call sites in this spec include something like "if the securing mechanism expects bytes, pass theBytes, otherwise pass the result of [=parsing JSON bytes to an Infra value=] given theBytes".
https://w3c.github.io/vc-data-model/#securing-mechanism-specifications says
Does this require that the securing mechanisms accept whichever of byte-sequence or map their caller wants to provide, or does it require the caller to send whichever the securing mechanism prefers? If the latter, how does the caller figure out which one the mechanism prefers, since that's not included in the associated registry?