Package org.webpki.cbor
Class CBORAsymKeySigner
Class for creating CBOR asymmetric key signatures.
Also see CBORSigner
.
Note that asymmetric key signatures do not permit using
both a keyId
and an in-line public key.
Also see CBORSigner.setKeyId(CBORObject)
and setPublicKey(PublicKey)
.
-
Constructor Summary
ConstructorDescriptionCBORAsymKeySigner
(PrivateKey privateKey) Creates a signer object with a private key.CBORAsymKeySigner
(PrivateKey privateKey, AsymSignatureAlgorithms algorithm) Creates a signer object with a private key.Creates a signer object with an external interface. -
Method Summary
Modifier and TypeMethodDescriptionsetPublicKey
(PublicKey publicKey) Put a public key into the signature container.Methods inherited from class org.webpki.cbor.CBORSigner
setCloneMode, setIntercepter, setKeyId, setProvider, sign
-
Constructor Details
-
CBORAsymKeySigner
Creates a signer object with an external interface.- Parameters:
signer
- Custom signer
-
CBORAsymKeySigner
Creates a signer object with a private key.The default signature algorithm to use is based on the recommendations in RFC 7518.
- Parameters:
privateKey
- Signature key
-
CBORAsymKeySigner
Creates a signer object with a private key.- Parameters:
privateKey
- Signature keyalgorithm
- Signature algorithm
-
-
Method Details
-
setPublicKey
Put a public key into the signature container.Note that a public key value of
null
is equivalent to the default (=no public key).- Parameters:
publicKey
- The public key ornull
- Returns:
this
-