/** * @param \Jose\Object\JWKInterface|string|array $data */ public function __construct($data) { parent::__construct(); if ($data instanceof JWKInterface) { $this->loadJWK($data->getAll()); } elseif (is_array($data)) { $this->loadJWK($data); } elseif (is_string($data)) { $this->loadPEM($data); } else { throw new \InvalidArgumentException('Unsupported input'); } $this->private = isset($this->values['d']); }