Closed iamcaptaincode closed 4 months ago
The reason for that seems to be that SealingPublicKey extends AsymmetricPublicKey
, but nothing is overwritten. The AsymmetricPublicKey
implements fromEncodedString
(and other static helpers for creation) but uses new self()
instead of new static
, thus always instantiating AsymmetricPublicKey
and not the child class.
We fixed this in v2.3.0. Thanks for pointing it out.
Hi there,
I'm exploring implementing PASETOs in a new API implementation, however when I try to utilize your demo code in the readme for PASERK, I'm getting a PHP error (just copying and pasting). Specifically it gives a Type error that the requirement for the seal constructor is a SealingKey. However the static method on SealingPublicKey::fromEncodedString returns an AsymmetricPublicKey instead.
I'm running PHP 8.1