class RsaKey extends CoseKey (View source)

Constants

COSE_KTY_EC2

EC2 key type

COSE_KTY_RSA

RSA key type

COSE_KEY_PARAM_KTY

Identification of the key type

COSE_KEY_PARAM_KID

Key identification value

COSE_KEY_PARAM_ALG

Key usage restriction to this algorithm

KTP_N

RSA modulus n key type parameter (key type 3, RSA)

KTP_E

RSA exponent e key type parameter (key type 3, RSA)

SUPPORTED_ALGORITHMS

Methods

__construct(ByteBuffer $modulus, ByteBuffer $exponent, int $algorithm)

CoseKey constructor.

static 
parseCbor(ByteBuffer $buffer, int $offset = 0, int $endOffset = null)

No description

from CoseKey
getCbor()

No description

int
getAlgorithm()

No description

from CoseKey
verifySignature(ByteBuffer $data, ByteBuffer $signature)

No description

algorithmSupported(int $algorithm)

No description

static 
fromCborData(array $data)

No description

getModulus()

No description

getExponent()

No description

asPem()

No description

Details

__construct(ByteBuffer $modulus, ByteBuffer $exponent, int $algorithm)

CoseKey constructor.

Parameters

ByteBuffer $modulus
ByteBuffer $exponent
int $algorithm IANA COSE Algorithm

static parseCbor(ByteBuffer $buffer, int $offset = 0, int $endOffset = null)

Parameters

ByteBuffer $buffer
int $offset
int $endOffset

getCbor()

int getAlgorithm()

Return Value

int

verifySignature(ByteBuffer $data, ByteBuffer $signature)

Parameters

ByteBuffer $data
ByteBuffer $signature

protected algorithmSupported(int $algorithm)

Parameters

int $algorithm

static fromCborData(array $data)

Parameters

array $data

ByteBuffer getModulus()

Return Value

ByteBuffer

ByteBuffer getExponent()

Return Value

ByteBuffer

asPem()