Re: Using a DID Identifier in a filename?

did:pkh's repository is using DIDs as filenames (with filename extensions), e.g.:
  https://github.com/w3c-ccg/did-pkh/blob/171973bd8e308fdbe8f31b3871693a620efb220b/test-vectors/did:pkh:bip122:000000000019d6689c085ae165831e93:128Lkh3S7CkDTBZ8W7BbpsN3YYizJMp8p6.jsonld

This seems to be working okay. But it won't work on Mac OS Classic where ":" is the directory separator.

On Thu, 13 Jan 2022 16:26:01 -0500
Dmitri Zagidulin <dzagidulin@gmail.com> wrote:

> Great question, Michael.
> 
> I've also been faced with this problem (storing did documents & keys
> for the did-cli tool), and I've found that URL-encoding the DIDs
> turns them into file system friendly identifiers.
> I like Orie's suggestion too, though.
> 
> On Thu, Jan 13, 2022 at 3:27 PM Michael Herman (Trusted Digital Web) <
> mwherman@parallelspace.net> wrote:  
> 
> > I like the latter Orie. It's also a good way to avoid file system
> > directory size related performance issues. Thk you
> >
> > Get Outlook for Android <https://aka.ms/AAb9ysg>
> > ------------------------------
> > *From:* Orie Steele <orie@transmute.industries>
> > *Sent:* Thursday, January 13, 2022 1:23:49 PM
> > *To:* Michael Herman (Trusted Digital Web)
> > <mwherman@parallelspace.net> *Cc:* public-credentials
> > (public-credentials@w3.org) < public-credentials@w3.org>
> > *Subject:* Re: Using a DID Identifier in a filename?
> >
> > Yes, I have had this problem before.
> >
> > and yes, you can just convert all reserved characters from the ABNF.
> >
> > https://www.w3.org/TR/did-core/#did-syntax (beware of "." and "_",
> > etc)
> >
> > If you can get away with dropping the "did:method" part, your files
> > will be more readable.
> >
> > You can also consider a folder structure approach:
> > /did/method/id.json
> >
> > OS
> >
> >
> > ᐧ
> >
> > On Thu, Jan 13, 2022 at 2:17 PM Michael Herman (Trusted Digital
> > Web) <  
>  [...]  
> >
> > Given that a colon is an invalid filename character (at least on
> > most PCs), does any one have any thoughts about a convention for
> > mapping a DID Identifier into a filename?
> >
> > For example, using a simple mapping of a colon into a dot (period)?
> > [image: Image]
> >
> > Michael Herman
> >
> > Get Outlook for Android <https://aka.ms/AAb9ysg>
> >
> >
> >
> > --
> > *ORIE STEELE*
> > Chief Technical Officer
> > www.transmute.industries
> >
> > <https://www.transmute.industries>
> >  

Received on Friday, 25 February 2022 15:31:45 UTC