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

EncryptionKey

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

class

EncryptionKey

EncryptionKey.php:10
class MMO\oauth\keys\EncryptionKey extends MMO\oauth\classes\aKey implements MMO\oauth\interfaces\iPrivateKey, MMO\oauth\interfaces\iPublicKey
Espace de noms
MMO\oauth\keys
Étend
aKey
Implémente
iPrivateKey, iPublicKey

Index

decrypt($data)Decrypt data in DER format using derivative keys
encrypt($data)Encrypt data in DER format using derivative keys
From($key) staticCreate an encryption key from random data
Random() static
sign($msg)Sign a string with a given algorithm.
verify($msg, $signature)Verify a signature with the message and method.
__construct($key)Constructs a new EncryptionKey object from a string of raw bytes.

Méthodes7

encrypt($data)

EncryptionKey.php:63

Encrypt data in DER format using derivative keys

function encrypt(string $data): string
$datastring
retournestringbase 64 encoded string

From($key)

staticEncryptionKey.php:28

Create an encryption key from random data

static function From(mixed $key): MMO\oauth\interfaces\iKey
$keymixed
retourneiKey

sign($msg)

EncryptionKey.php:43

Sign a string with a given algorithm.

function sign(string $msg): string
$msgstringThe message to sign
retournestringAn encrypted message
lèveUnsupported algorithm or bad key was specified

verify($msg, $signature)

EncryptionKey.php:53

Verify a signature with the message and method.

function verify(string $msg, string $signature): bool
$msgstringThe original message (header and body)
$signaturestringThe original signature
retournebool

__construct($key)

EncryptionKey.php:15

Constructs a new EncryptionKey object from a string of raw bytes.

function __construct(string $key)
$keystring
Membres hérités (5)
PropriétésDéclaré parDescription
contentaKey
MéthodesDéclaré parDescription
FromFile($filename, $args)aKeyParse a key from a file
getContent()aKey
jsonSerialize()aKey
__toString()aKey