Skip to content

Core\Crypto\PublicKey

The public half of a key pair, such as a key that another server sent you. You use it to check a signature or to agree on a shared secret.

Returned by

You get a Core\Crypto\PublicKey from these methods:

Members

3 members.

MemberSignature
readread(bytes $encoded, Core\Crypto\KeyKind $kind, Core\Crypto\PublicKey::Format $format): Core\Crypto\PublicKey
writewrite(Core\Crypto\PublicKey::Format $format): bytes
kindkind(): Core\Crypto\KeyKind

Enums

  • FormatThe encoding that a public key is read from or written to. The three cases are the export formats of WebCrypto, with the same names. So you can give a browser a key in the format it asks for.