Package org.webpki.json
Class JSONSigner
java.lang.Object
org.webpki.json.JSONSigner
- Direct Known Subclasses:
JSONAsymKeySigner
,JSONHmacSigner
,JSONX509Signer
Support class for signature generators.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
setExcluded
(String[] excluded) Set "excl" for this signature.setExtensionData
(JSONObjectWriter extensions) Set specific extension data for this signature.setExtensionNames
(String[] names) Set (object level) list of permitted extension elements.void
setExtensionNames
(String[] names, boolean encryptionMode) Set optional "keyId" for this signature.
-
Method Details
-
setExtensionNames
Set (object level) list of permitted extension elements. This must only be done for the first signer in a multi-signature scenario- Parameters:
names
- A list of permitted extensions- Returns:
this
-
setExtensionData
Set specific extension data for this signature.- Parameters:
extensions
- JSON object holding the extension properties and associated values- Returns:
this
-
setExcluded
Set "excl" for this signature.- Parameters:
excluded
- Array holding the names of properties that must be excluded from the signature- Returns:
this
-
setKeyId
Set optional "keyId" for this signature. Note: defaultnull
.- Parameters:
keyId
- The identifier. If null no KeyId is generated- Returns:
this
-
getNormalizedData
public byte[] getNormalizedData() -
setExtensionNames
-