Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.bouncycastle.asn1.cms;
 
RFC 5544: Binding Documents with Time-Stamps; Evidence object.

 Evidence ::= CHOICE {
     tstEvidence    [0] TimeStampTokenEvidence,   -- see RFC 3161
     ersEvidence    [1] EvidenceRecord,           -- see RFC 4998
     otherEvidence  [2] OtherEvidence
 }
 
public class Evidence
    extends ASN1Object
    implements ASN1Choice
    public Evidence(TimeStampTokenEvidence tstEvidence)
    {
        this. = tstEvidence;
    }
    private Evidence(ASN1TaggedObject tagged)
    {
        if (tagged.getTagNo() == 0)
        {
            this. = TimeStampTokenEvidence.getInstance(taggedfalse);
        }
    }

    
Return an Evidence object from the given object.

Accepted inputs:

  • Evidence object
  • ASN1TaggedObject input formats with Evidence data inside

Parameters:
obj the object we want converted.
Throws:
java.lang.IllegalArgumentException if the object cannot be converted.
    public static Evidence getInstance(Object obj)
    {
        if (obj == null || obj instanceof Evidence)
        {
            return (Evidence)obj;
        }
        else if (obj instanceof ASN1TaggedObject)
        {
            return new Evidence(ASN1TaggedObject.getInstance(obj));
        }
        throw new IllegalArgumentException("unknown object in getInstance");
    }
    {
        return ;
    }
    public ASN1Primitive toASN1Primitive()
    {
       if ( != null)
       {
           return new DERTaggedObject(false, 0, );
       }
       return null;
    }
New to GrepCode? Check out our FAQ X