Index

EncryptionKey

MMO\oauth\keys · 1 symbol · generated 5 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
Namespace
MMO\oauth\keys
Extends
aKey
Implements
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.

Methods7

encrypt($data)

EncryptionKey.php:63

Encrypt data in DER format using derivative keys

function encrypt(string $data): string
$datastring
returnsstringbase 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
returnsiKey

sign($msg)

EncryptionKey.php:43

Sign a string with a given algorithm.

function sign(string $msg): string
$msgstringThe message to sign
returnsstringAn encrypted message
throwsUnsupported 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
returnsbool

__construct($key)

EncryptionKey.php:15

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

function __construct(string $key)
$keystring
Inherited members (5)
PropertiesDeclared byDescription
contentaKey
MethodsDeclared byDescription
FromFile($filename, $args)aKeyParse a key from a file
getContent()aKey
jsonSerialize()aKey
__toString()aKey