Class COSEOKPKey
java.lang.Object
com.authlete.cbor.CBORItem
com.authlete.cbor.CBORPairList
com.authlete.cose.COSEKey
com.authlete.cose.COSEOKPKey
-
Constructor Summary
ConstructorsConstructorDescriptionCOSEOKPKey
(List<? extends CBORPair> pairs) A constructor with key parameters. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addJwkProperties
(Map<String, Object> map) Add JWK properties to the given map.getCrv()
Get the curve (the value of thecrv
parameter).byte[]
getD()
Get the private key (the value of thed
parameter).byte[]
getX()
Get the public key (the value of thex
parameter).boolean
Get the flag indicating whether this key contains private parameters.Methods inherited from class com.authlete.cose.COSEKey
build, build, copy, createPrivateKey, createPublicKey, fromJwk, getAlg, getBaseIv, getKeyOps, getKid, getKty, getParameters, toJwk, toPublic
Methods inherited from class com.authlete.cbor.CBORPairList
encode, findByKey, getPairs, parse, prettify, toString
Methods inherited from class com.authlete.cbor.CBORItem
encode, encodeMajorWithNumber, encodeToBase64, encodeToBase64Url, encodeToHex, getComment, prettify, setComment, toString
-
Constructor Details
-
COSEOKPKey
-
-
Method Details
-
isPrivate
-
addJwkProperties
Description copied from class:COSEKey
Add JWK properties to the given map.This method is called from within the
COSEKey.toJwk()
method. Subclasses of theCOSEKey
class should override this method.- Overrides:
addJwkProperties
in classCOSEKey
- Parameters:
map
- A map to which JWK properties should be added.
-
getCrv
Get the curve (the value of thecrv
parameter).The type of the value is an integer (
int
,long
orBigInteger
) or a string (String
).- Returns:
- The curve.
- See Also:
-
getX
public byte[] getX()Get the public key (the value of thex
parameter).- Returns:
- The public key.
-
getD
public byte[] getD()Get the private key (the value of thed
parameter).- Returns:
- The private key.
-