Class SignaturePolicyIdentifierImpl
java.lang.Object
es.uji.crypto.xades.jxades.security.xml.XAdES.SignaturePolicyIdentifierImpl
- All Implemented Interfaces:
SignaturePolicyIdentifier
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate byte[]
boolean
void
setDescription
(String description) void
setIdentifier
(String identifier) void
setIdentifier
(String identifier, String hashBase64, String hashAlgorithm) Sets the SigPolicyId element values.void
setImplied
(boolean implied) void
setQualifier
(String qualifier) Sets the policy qualifier, wich must be an URL pointing to the human-readable document (usually a PDF) describing the policy.
-
Field Details
-
implied
private boolean implied -
sigPolicyId
-
description
-
sigPolicyQualifierSPURI
-
sigPolicyHashBase64
-
sigPolicyHashHashAlgorithm
-
-
Constructor Details
-
SignaturePolicyIdentifierImpl
public SignaturePolicyIdentifierImpl(boolean implied)
-
-
Method Details
-
inputStreamToByteArray
- Throws:
IOException
-
setIdentifier
- Specified by:
setIdentifier
in interfaceSignaturePolicyIdentifier
- Throws:
IOException
NoSuchAlgorithmException
-
setIdentifier
public void setIdentifier(String identifier, String hashBase64, String hashAlgorithm) throws IOException, NoSuchAlgorithmException Description copied from interface:SignaturePolicyIdentifier
Sets the SigPolicyId element values.- Specified by:
setIdentifier
in interfaceSignaturePolicyIdentifier
- Parameters:
identifier
- Policy identifier, usually an URL pointing the computer processable XML policy definition filehashBase64
- Hash of the policy (Base64 encoded) pointed by theidentifier parameter. May be null, but only if the
identifier is an URL universally accessible
hashAlgorithm
- Algorithm used for the calculation of the hash on thehashBase64
parameter. Ignored whenhashBase64
is null, but mandatory when it's not- Throws:
IOException
NoSuchAlgorithmException
-
isImplied
public boolean isImplied()- Specified by:
isImplied
in interfaceSignaturePolicyIdentifier
-
setImplied
public void setImplied(boolean implied) - Specified by:
setImplied
in interfaceSignaturePolicyIdentifier
-
getIdentifier
- Specified by:
getIdentifier
in interfaceSignaturePolicyIdentifier
-
getHashBase64
- Specified by:
getHashBase64
in interfaceSignaturePolicyIdentifier
-
getDescription
- Specified by:
getDescription
in interfaceSignaturePolicyIdentifier
-
setDescription
- Specified by:
setDescription
in interfaceSignaturePolicyIdentifier
-
getQualifier
- Specified by:
getQualifier
in interfaceSignaturePolicyIdentifier
-
setQualifier
Description copied from interface:SignaturePolicyIdentifier
Sets the policy qualifier, wich must be an URL pointing to the human-readable document (usually a PDF) describing the policy.- Specified by:
setQualifier
in interfaceSignaturePolicyIdentifier
- Parameters:
qualifier
- URL to the policy human-readable description document
-
getHashAlgorithm
- Specified by:
getHashAlgorithm
in interfaceSignaturePolicyIdentifier
-