Package com.itextpdf.signatures
Class SignaturePolicyInfo
- java.lang.Object
-
- com.itextpdf.signatures.SignaturePolicyInfo
-
public class SignaturePolicyInfo extends java.lang.Object
Class that encapsulates the signature policy informationSample:
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
Fields Modifier and Type Field Description private static IBouncyCastleFactory
FACTORY
private java.lang.String
policyDigestAlgorithm
private byte[]
policyHash
private java.lang.String
policyIdentifier
private java.lang.String
policyUri
-
Constructor Summary
Constructors Constructor Description SignaturePolicyInfo(java.lang.String policyIdentifier, byte[] policyHash, java.lang.String policyDigestAlgorithm, java.lang.String policyUri)
Constructs a newSignaturePolicyInfo
instanceSignaturePolicyInfo(java.lang.String policyIdentifier, java.lang.String policyHashBase64, java.lang.String policyDigestAlgorithm, java.lang.String policyUri)
Constructs a newSignaturePolicyInfo
instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getPolicyDigestAlgorithm()
Get the digestion algorithm of the signature policy.byte[]
getPolicyHash()
Get the hash of the signature policy.java.lang.String
getPolicyIdentifier()
Get the ID of the signature policy.java.lang.String
getPolicyUri()
Get the uri of the full policy description.(package private) ISignaturePolicyIdentifier
toSignaturePolicyIdentifier()
-
-
-
Field Detail
-
FACTORY
private static final IBouncyCastleFactory FACTORY
-
policyIdentifier
private final java.lang.String policyIdentifier
-
policyHash
private final byte[] policyHash
-
policyDigestAlgorithm
private final java.lang.String policyDigestAlgorithm
-
policyUri
private final java.lang.String policyUri
-
-
Constructor Detail
-
SignaturePolicyInfo
public SignaturePolicyInfo(java.lang.String policyIdentifier, byte[] policyHash, java.lang.String policyDigestAlgorithm, java.lang.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(java.lang.String policyIdentifier, java.lang.String policyHashBase64, java.lang.String policyDigestAlgorithm, java.lang.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 Detail
-
getPolicyIdentifier
public java.lang.String 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
public java.lang.String getPolicyDigestAlgorithm()
Get the digestion algorithm of the signature policy.- Returns:
- the digestion algorithm of the signature policy
-
getPolicyUri
public java.lang.String getPolicyUri()
Get the uri of the full policy description.- Returns:
- the uri of the full policy description
-
toSignaturePolicyIdentifier
ISignaturePolicyIdentifier toSignaturePolicyIdentifier()
-
-