diff --git a/phpseclib/Crypt/Common/AsymmetricKey.php b/phpseclib/Crypt/Common/AsymmetricKey.php index b2da0aa2..f3efb733 100644 --- a/phpseclib/Crypt/Common/AsymmetricKey.php +++ b/phpseclib/Crypt/Common/AsymmetricKey.php @@ -206,6 +206,7 @@ abstract class AsymmetricKey $components['format'] = $format; $new = static::onLoad($components); + $new->format = $format; return $new instanceof PrivateKey ? $new->withPassword($password) : $new;