class Ec2Key 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

CURVE_P256

NIST P-256 also known as secp256r1

CURVE_P384

NIST P-256 also known as secp256r1

CURVE_P521

NIST P-521 also known as secp256r1

SUPPORTED_CURVES

KTP_CRV

EC identifier

KTP_X

X-coordinate

KTP_Y

Y-coordinate

SUPPORTED_ALGORITHMS

CURVE_KEY_LENGTH

CURVE_OID

Methods

__construct(ByteBuffer $x, ByteBuffer $y, int $curve, 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

getX()

No description

getY()

No description

int
getCurve()

No description

asPEM()

No description

getUncompressedCoordinates()

No description

Details

__construct(ByteBuffer $x, ByteBuffer $y, int $curve, int $algorithm)

CoseKey constructor.

Parameters

ByteBuffer $x
ByteBuffer $y
int $curve
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 getX()

Return Value

ByteBuffer

ByteBuffer getY()

Return Value

ByteBuffer

int getCurve()

Return Value

int

asPEM()

getUncompressedCoordinates()