Package org.xwiki.rendering.signature
Interface BlockSignatureGenerator
-
@Role public interface BlockSignatureGenerator
Generate the signature of aBlock
.- Since:
- 6.1M2
- Version:
- $Id: 2954ff3f72fe478daf337f30ed47be094c85b3e3 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
generate(org.xwiki.rendering.block.Block block, org.xwiki.crypto.signer.param.CMSSignedDataGeneratorParameters params)
Generate a signature.boolean
isSupported(org.xwiki.rendering.block.Block block)
Check if the given block can be supported by this signer.
-
-
-
Method Detail
-
generate
byte[] generate(org.xwiki.rendering.block.Block block, org.xwiki.crypto.signer.param.CMSSignedDataGeneratorParameters params) throws GeneralSecurityException, IOException
Generate a signature.- Parameters:
block
- a rendering block to sign.params
- generator parameters.- Returns:
- a Base64 encoded signature.
- Throws:
GeneralSecurityException
- on signature operation error.IOException
- on encoding error.
-
isSupported
boolean isSupported(org.xwiki.rendering.block.Block block)
Check if the given block can be supported by this signer.- Parameters:
block
- the block to check.- Returns:
- true if this block can be signed/verified by this signer.
-
-