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[]booleanvoidsetDescription(String description) voidsetIdentifier(String identifier) voidsetIdentifier(String identifier, String hashBase64, String hashAlgorithm) Sets the SigPolicyId element values.voidsetImplied(boolean implied) voidsetQualifier(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:
setIdentifierin interfaceSignaturePolicyIdentifier- Throws:
IOExceptionNoSuchAlgorithmException
-
setIdentifier
public void setIdentifier(String identifier, String hashBase64, String hashAlgorithm) throws IOException, NoSuchAlgorithmException Description copied from interface:SignaturePolicyIdentifierSets the SigPolicyId element values.- Specified by:
setIdentifierin 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 theidentifier is an URL universally accessiblehashAlgorithm- Algorithm used for the calculation of the hash on thehashBase64parameter. Ignored whenhashBase64is null, but mandatory when it's not- Throws:
IOExceptionNoSuchAlgorithmException
-
isImplied
public boolean isImplied()- Specified by:
isImpliedin interfaceSignaturePolicyIdentifier
-
setImplied
public void setImplied(boolean implied) - Specified by:
setImpliedin interfaceSignaturePolicyIdentifier
-
getIdentifier
- Specified by:
getIdentifierin interfaceSignaturePolicyIdentifier
-
getHashBase64
- Specified by:
getHashBase64in interfaceSignaturePolicyIdentifier
-
getDescription
- Specified by:
getDescriptionin interfaceSignaturePolicyIdentifier
-
setDescription
- Specified by:
setDescriptionin interfaceSignaturePolicyIdentifier
-
getQualifier
- Specified by:
getQualifierin interfaceSignaturePolicyIdentifier
-
setQualifier
Description copied from interface:SignaturePolicyIdentifierSets the policy qualifier, wich must be an URL pointing to the human-readable document (usually a PDF) describing the policy.- Specified by:
setQualifierin interfaceSignaturePolicyIdentifier- Parameters:
qualifier- URL to the policy human-readable description document
-
getHashAlgorithm
- Specified by:
getHashAlgorithmin interfaceSignaturePolicyIdentifier
-