Package com.itextpdf.signatures
Class SignaturePolicyInfo
java.lang.Object
com.itextpdf.signatures.SignaturePolicyInfo
Class that encapsulates the signature policy information
Sample:
SignaturePolicyInfo spi = new SignaturePolicyInfo("2.16.724.1.3.1.1.2.1.9", "G7roucf600+f03r/o0bAOQ6WAs0=", "SHA-1", "https://sede.060.gob.es/politica_de_firma_anexo_1.pdf");
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final IBouncyCastleFactory
private final String
private final byte[]
private final String
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionSignaturePolicyInfo
(String policyIdentifier, byte[] policyHash, String policyDigestAlgorithm, String policyUri) Constructs a newSignaturePolicyInfo
instanceSignaturePolicyInfo
(String policyIdentifier, String policyHashBase64, String policyDigestAlgorithm, String policyUri) Constructs a newSignaturePolicyInfo
instance -
Method Summary
Modifier and TypeMethodDescriptionGet the digestion algorithm of the signature policy.byte[]
Get the hash of the signature policy.Get the ID of the signature policy.Get the uri of the full policy description.(package private) ISignaturePolicyIdentifier
-
Field Details
-
FACTORY
-
policyIdentifier
-
policyHash
private final byte[] policyHash -
policyDigestAlgorithm
-
policyUri
-
-
Constructor Details
-
SignaturePolicyInfo
public SignaturePolicyInfo(String policyIdentifier, byte[] policyHash, String policyDigestAlgorithm, String policyUri) Constructs a newSignaturePolicyInfo
instance- Parameters:
policyIdentifier
- the id of the signature policypolicyHash
- the hash of the signature policypolicyDigestAlgorithm
- the digestion algorithm of the signature policypolicyUri
- the uri of the full policy description
-
SignaturePolicyInfo
public SignaturePolicyInfo(String policyIdentifier, String policyHashBase64, String policyDigestAlgorithm, String policyUri) Constructs a newSignaturePolicyInfo
instance- Parameters:
policyIdentifier
- the id of the signature policypolicyHashBase64
- the Base64 presentation of the hash of the signature policypolicyDigestAlgorithm
- the digestion algorithm of the signature policypolicyUri
- the uri of the full policy description
-
-
Method Details
-
getPolicyIdentifier
Get the ID of the signature policy.- Returns:
- the ID of the signature policy
-
getPolicyHash
public byte[] getPolicyHash()Get the hash of the signature policy.- Returns:
- the hash of the signature policy
-
getPolicyDigestAlgorithm
Get the digestion algorithm of the signature policy.- Returns:
- the digestion algorithm of the signature policy
-
getPolicyUri
Get the uri of the full policy description.- Returns:
- the uri of the full policy description
-
toSignaturePolicyIdentifier
ISignaturePolicyIdentifier toSignaturePolicyIdentifier()
-