public class SignaturePolicyIdentifier
extends iaik.asn1.structures.AttributeValue
SignaturePolicyIdentifier ::= CHOICE{
signaturePolicyId SignaturePolicyId,
signaturePolicyImplied SignaturePolicyImplied -- not used in this version}
SignaturePolicyId ::= SEQUENCE {
sigPolicyId SigPolicyId,
sigPolicyHash SigPolicyHash,
sigPolicyQualifiers SEQUENCE SIZE (1..MAX) OF SigPolicyQualifierInfo OPTIONAL}
SignaturePolicyImplied ::= NULL
SigPolicyId ::= OBJECT IDENTIFIER
SigPolicyHash ::= OtherHashAlgAndValue
OtherHashAlgAndValue ::= SEQUENCE {
hashAlgorithm AlgorithmIdentifier,
hashValue OtherHashValue }
OtherHashValue ::= OCTET STRING
The ASN.1 structure SigPolicyQualifierInfo is represented by the class
SignaturePolicyQualifierInfo
.Modifier and Type | Field and Description |
---|---|
static iaik.asn1.ObjectID |
oid
The attributeType object identifier of the SignaturePolicyIdentifier attribute.
|
Constructor and Description |
---|
SignaturePolicyIdentifier()
Empty default constructor.
|
SignaturePolicyIdentifier(iaik.asn1.ASN1Object obj)
Creates an SignaturePolicyIdentifier from its ASN.1 representation.
|
SignaturePolicyIdentifier(iaik.asn1.ObjectID policyID)
Constructor for setting the applicable signature policy's ID.
|
SignaturePolicyIdentifier(iaik.asn1.ObjectID policyID,
iaik.asn1.structures.AlgorithmID hashAlgorithm,
byte[] policyHashValue)
Constructor for setting the signature policy's ID, hash and hash algorithm.
|
Modifier and Type | Method and Description |
---|---|
void |
addSignaturePolicyQualifier(SignaturePolicyQualifierInfo policyQualifier)
Add a signature policy qualifier, to add further properties to the policy.
|
void |
decode(iaik.asn1.ASN1Object obj)
Decodes the given ASN.1 SignaturePolicyIdentifier object
|
boolean |
equals(java.lang.Object obj)
Compares this
SignaturePolicyIdentifier to the specified object. |
iaik.asn1.ObjectID |
getAttributeType() |
iaik.asn1.structures.AlgorithmID |
getHashAlgorithm()
Returns the hash algorithm used to calculate the hash value of this signature policy
|
iaik.asn1.ObjectID |
getPolicyID()
Returns this signature policy's ID
|
byte[] |
getSigPolicyHash()
The hash value of this signature policy.
|
java.util.ArrayList<SignaturePolicyQualifierInfo> |
getSigPolicyQualifiers()
Returns the signature policy qualifiers that had been set for this signature policy
|
iaik.asn1.ASN1Object |
toASN1Object()
Returns this SignaturePolicyIdentifier as ASN1Object.
|
java.lang.String |
toString() |
public static final iaik.asn1.ObjectID oid
public SignaturePolicyIdentifier()
public SignaturePolicyIdentifier(iaik.asn1.ObjectID policyID)
policyID
- the ID of the signature policypublic SignaturePolicyIdentifier(iaik.asn1.ObjectID policyID, iaik.asn1.structures.AlgorithmID hashAlgorithm, byte[] policyHashValue)
policyID
- the ID of the signature policyhashAlgorithm
- the algorithm, that has been used to create the hash valuepolicyHashValue
- hash value of the signature policypublic SignaturePolicyIdentifier(iaik.asn1.ASN1Object obj) throws iaik.asn1.CodingException
obj
- the SignaturePolicyIdentifier as ASN1Objectiaik.asn1.CodingException
public void addSignaturePolicyQualifier(SignaturePolicyQualifierInfo policyQualifier)
policyQualifier
- the signature policy qualifier to be addedpublic void decode(iaik.asn1.ASN1Object obj) throws iaik.asn1.CodingException
obj
- the SignaturePolicyIdentifier as ASN1Objectiaik.asn1.CodingException
public iaik.asn1.ASN1Object toASN1Object() throws iaik.asn1.CodingException
iaik.asn1.CodingException
public iaik.asn1.ObjectID getAttributeType()
getAttributeType
in class iaik.asn1.structures.AttributeValue
public iaik.asn1.ObjectID getPolicyID()
public iaik.asn1.structures.AlgorithmID getHashAlgorithm()
public byte[] getSigPolicyHash()
public java.util.ArrayList<SignaturePolicyQualifierInfo> getSigPolicyQualifiers()
public java.lang.String toString()
toString
in class iaik.asn1.structures.AttributeValue
public boolean equals(java.lang.Object obj)
SignaturePolicyIdentifier
to the specified object.equals
in class java.lang.Object
obj
- the object to compare this SignaturePolicyIdentifier
against.true
, if the given object is equal to this
SignaturePolicyIdentifier
, false
otherwise