public class DataToSign extends Object implements Serializable
Data to be signed externally (e.g. in the Web by a browser plugin).
getDataToSign()
and getDigestAlgorithm()
can be used to get the data bytes to be signed
(this is usually data derived from signature parameters - SignedInfo) and
digest algorithm (e.g. SHA-256, SHA-512 etc) used in signing.
After a signature has been created externally, then it must be included back by calling
finalize(byte[])
with the signature value. This will return a Signature
object
with the signature value, OCSP response etc included.
Constructor and Description |
---|
DataToSign(byte[] dataToBeSigned,
org.digidoc4j.impl.SignatureFinalizer signatureFinalizer)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Signature |
finalize(byte[] signatureValue)
Finalize the signature by adding externally created signature value in bytes.
|
Configuration |
getConfiguration()
Container configuration
|
byte[] |
getDataToSign()
Data to be signed externally.
|
DigestAlgorithm |
getDigestAlgorithm()
Signature digest algorithm to be used when creating the signature value.
|
SignatureParameters |
getSignatureParameters()
Signature parameters used to create the signature.
|
public DataToSign(byte[] dataToBeSigned, org.digidoc4j.impl.SignatureFinalizer signatureFinalizer)
dataToBeSigned
- digest value of the datasignatureFinalizer
- Signature finalizerpublic SignatureParameters getSignatureParameters()
public DigestAlgorithm getDigestAlgorithm()
public byte[] getDataToSign()
public Configuration getConfiguration()
public Signature finalize(byte[] signatureValue)
signatureValue
- externally created signature value bytes.Copyright © 2024. All rights reserved.