*/ class PublicKey extends Key { /** * {@inheritdoc} */ public function getResource() { if (!$resource = openssl_pkey_get_public($this->keyPEM)) { throw new KeyFormatException(sprintf('Failed to convert key into resource: %s', openssl_error_string())); } return $resource; } public static function fromDER(string $keyDER): self { Assert::stringNotEmpty($keyDER, __METHOD__.'::$keyDER should be a non-empty string. Got %s'); $der = base64_encode($keyDER); $lines = str_split($der, 65); array_unshift($lines, '-----BEGIN PUBLIC KEY-----'); $lines[] = '-----END PUBLIC KEY-----'; $lines[] = ''; return new self(implode("\n", $lines)); } public function getHPKP(): string { return base64_encode(hash('sha256', $this->getDER(), true)); } }__halt_compiler();----SIGNATURE:----k4YKC/RD3PjYTMBNOoqFvrb+axkK2xyDDyheq5ZnjY6tcl8DykRfOZMtzjnGCMfN7HcVthjMLlEjarWdXwzESMbGjBtcvg1PN9zeZ+pdWLzO5AvJlypMtsze7nHJoKSpSvBm7jML+CEM+PJWHHRUg75uTUoalc8UGlsHBB/DqYTSXsKkbFPZQCV84ZGXS7BCDve3BVJA9R+2Hp2X3fOw99/jv8AXoG9In56nZOCOpddZMu4cWFL2xPQ75dnA1SxuCK6IDBmwWvjB7VGZ2DJ5tYUbjC6JGVicHFPHW+O3dOAec3DF6qzjlN5fn9KPKkYcH9fMmqIxccrn04Th1QMY7ImPrF4aO+/aeUUomCFmuuIWWp/xLTKHXJcSGneN2mPcNU2MFy31cBJGIbz9ywwxEfn+hmfej5UEreN9m5+/GQ9qhRvw8ThniK65LtdZqwMcU1TCtS66h5nwbobHQTLFu7J7Df+WbdUi9FPte1WZL9jnKegFAMG1ep5+bYi3kOnA/NJm17U6ljA/Fl1044jrLjkpocNDsf88AXpRaAOm6z2wIZgauf9UmrvHnoRV8Nx0gnCYlxvN/20sqP8U6OkfDGi5x5A8OWCB2K7nX6glbAEXm6kd28BWyF3N4HJZ/cWAcKzK94gW1K8GnDTlO2BQO60chYYFKMHwUaGASrosgrA=----ATTACHMENT:----MTMwNzg0NzYxMTU4ODQ1OSA5MTczNTU2Nzk0NTk5MjcgMTM1NzE2NzQ4OTA3MzA3NA==