Generate identifiable peerid

I want to generate peerid which is identifiable by other users. My app already uses a unique id to identify each user. I want to create peerid corresponding to this unique user id so that peers who have this user id can establish a connection with the user. Suppose I have a userid ‘5f68bc8ad53c7d’ I want to generate a peerid corresponding to this id.

Can you clarify what you’re trying to do a bit more? It sounds like you want to seed your PeerId generation with the userid, but you should avoid doing this, and we don’t support seeding because of the security implications.

Also, hard coupling these two makes it extremely difficult to later rotate your keys to a new format.