decentralized-identity / decentralized-identity/did-common-dotnet
Implementation ("porting") parity between different implementations
- Dominant language
- C#
- Stars
- 18
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Do we need or want to maintain an implementation parity between different language versions?
This comes from a discussion at https://github.com/decentralized-identity/did-common-dotnet/issues/2#issuecomment-782704336. In this particular case do we need a `regex` borrowed from a Java implementation if it were possible to use [Uri](https://docs.microsoft.com/en-us/dotnet/api/system.uri)?
Maybe one issue to consider is security implications of regexes, maybe there are cases on maintainability and developer familiriaty.
I do think we should provide simple functions to check validity of varioud DID constructors, such as DIDs, and they may make use of regexes where warranted (like checking allowed range of characters as per spec if it's the best way). The functions could perhaps return [ValidationResult](https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.validationresult) objects and so where making sense, a function like `CheckAll` could be provided that combines other checks. This likely warrants an issue for discussion on its own. This idea may preclude idea on inheritance hierarchies, https://github.com/decentralized-identity/did-common-dotnet/pull/4 moved away from those, though.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.