Class SignatureDataWrapper
java.lang.Object
br.ufsc.labsec.signature.wrappers.SignatureWrapper<InputStream>
br.ufsc.labsec.signature.wrappers.SignatureDataWrapper
public class SignatureDataWrapper extends SignatureWrapper<InputStream>
-
Nested Class Summary
Nested classes/interfaces inherited from class br.ufsc.labsec.signature.wrappers.SignatureWrapper
SignatureWrapper.Format
-
Field Summary
Fields inherited from class br.ufsc.labsec.signature.wrappers.SignatureWrapper
detachedData, filename, format, hashes, receiptRequestData, receiptRequestName, signedData
-
Method Summary
Modifier and Type Method Description static SignatureDataWrapper
attached(InputStream signedData, String filename)
Creates a signature data wrapper for an attached signature.static SignatureDataWrapper
detached(InputStream signedData, InputStream detachedData, String filename)
Creates a signature data wrapper for a detached signature.static SignatureDataWrapper
detached(InputStream signedData, Map<String,byte[]> hashes, String filename)
boolean
hasReceiptRequest()
static SignatureDataWrapper
resolveSigFormat(InputStream signedData, InputStream detachedData, String filename)
Resolve the signature format based on the given parameters.SignatureBytesWrapper
toByteWrapper()
Methods inherited from class br.ufsc.labsec.signature.wrappers.SignatureWrapper
det, format, hashes, name, receiptRequest, receiptRequestName, sig, withReceiptRequest
-
Method Details
-
hasReceiptRequest
public boolean hasReceiptRequest()- Specified by:
hasReceiptRequest
in classSignatureWrapper<InputStream>
-
attached
Creates a signature data wrapper for an attached signature.- Parameters:
signedData
- The signature datafilename
- The filename- Returns:
- The signature data wrapper
-
detached
public static SignatureDataWrapper detached(InputStream signedData, InputStream detachedData, String filename)Creates a signature data wrapper for a detached signature.- Parameters:
signedData
- The signature datadetachedData
- The detached datafilename
- The filename- Returns:
- The signature data wrapper
-
detached
public static SignatureDataWrapper detached(InputStream signedData, Map<String,byte[]> hashes, String filename) -
resolveSigFormat
public static SignatureDataWrapper resolveSigFormat(InputStream signedData, InputStream detachedData, String filename)Resolve the signature format based on the given parameters.- Parameters:
signedData
- The signature datadetachedData
- The detached datafilename
- The filename- Returns:
- The signature data wrapper (ATTACHED or DETACHED)
-
toByteWrapper
- Throws:
IOException
-