MMOframework
Pourquoi l'IA Playground Bibliothèques Documentation Rechercher Agence
FR EN
Index

PublicKey

MMO\oauth\keys · 1 symbole · générée le 27 Oct 2026

class

PublicKey

PublicKey.php:13
class MMO\oauth\keys\PublicKey extends MMO\oauth\classes\aKey implements MMO\oauth\interfaces\iPublicKey
Espace de noms
MMO\oauth\keys
Étend
aKey
Implémente
iPublicKey

Index

encrypt($data)Encrypt data using AES256.
FromJWK($jwk) staticParse a JSON Web key (JWK)
FromJWKs($jwks) staticParse a set of JWK keys
toPEM()Extract the public key as a PEM
verify($msg, $signature, $algorithm)Verify a signature with the message, key and method.
__construct($key)
__toString()

Méthodes7

encrypt($data)

PublicKey.php:106

Encrypt data using AES256.

function encrypt(string $data)
$datastring
retournebase 64 encoded string

FromJWK($jwk)

staticPublicKey.php:30

Parse a JSON Web key (JWK)

static function FromJWK(array $jwk): static
$jwkarrayAn individual JWK
retournestatic

FromJWKs($jwks)

staticPublicKey.php:62

Parse a set of JWK keys

static function FromJWKs(array $jwks): array
$jwksarrayThe JSON Web Key Set as an associative array
retournearray

verify($msg, $signature, $algorithm)

PublicKey.php:97

Verify a signature with the message, key and method. Not all methods are symmetric, so we must have a separate verify and sign method.

function verify(string $msg, string $signature, ?string $algorithm = null): bool
$msgstringThe original message (header and body)
$signaturestringThe original signature
$algorithm = nullnull | string
retournebool
Membres hérités (4)
PropriétésDéclaré parDescription
contentaKey
MéthodesDéclaré parDescription
FromFile($filename, $args)aKeyParse a key from a file
getContent()aKey
jsonSerialize()aKey