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 voidaddJwkProperties(Map<String, Object> map) Add JWK properties to the given map.getCrv()Get the curve (the value of thecrvparameter).byte[]getD()Get the private key (the value of thedparameter).byte[]getX()Get the public key (the value of thexparameter).booleanGet 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, toPublicMethods inherited from class com.authlete.cbor.CBORPairList
encode, findByKey, getPairs, parse, prettify, toStringMethods 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:COSEKeyAdd JWK properties to the given map.This method is called from within the
COSEKey.toJwk()method. Subclasses of theCOSEKeyclass should override this method.- Overrides:
addJwkPropertiesin classCOSEKey- Parameters:
map- A map to which JWK properties should be added.
-
getCrv
Get the curve (the value of thecrvparameter).The type of the value is an integer (
int,longorBigInteger) or a string (String).- Returns:
- The curve.
- See Also:
-
getX
public byte[] getX()Get the public key (the value of thexparameter).- Returns:
- The public key.
-
getD
public byte[] getD()Get the private key (the value of thedparameter).- Returns:
- The private key.
-