Need for small refactoring to fix unused code
The code needed some refactorings
- the class wrapPHPSECLIB sets a private variable of the parent class, which leads to the creation of a new (unused) variable, which is unexpected behaviour ("$this->curvename = ..."). This if fixed by fixing point number 2.
- Extending a class PrivateKey with the new class wrapPHPSECLIB just to get protected properties leads to new problems. Reflection should be used instead
- Unused variables and unused code in variable places
- Avoid usage of internal function CBOR\Tag\Utils::hexToString. Use public interface instead.
- Fix minor issues discovered by static code analysis (phpstan, psalm)
Edited by Martin Dittmar