Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.bouncycastle.asn1.crmf;
  
 
 public class POPOPrivKey
     extends ASN1Object
     implements ASN1Choice
 {
     public static final int thisMessage = 0;
     public static final int subsequentMessage = 1;
     public static final int dhMAC = 2;
     public static final int agreeMAC = 3;
     public static final int encryptedKey = 4;
 
     private int tagNo;
     private ASN1Encodable obj;
 
     private POPOPrivKey(ASN1TaggedObject obj)
     {
         this. = obj.getTagNo();
 
         switch ()
         {
         case :
             this. = DERBitString.getInstance(objfalse);
             break;
         case :
             this. = SubsequentMessage.valueOf(ASN1Integer.getInstance(objfalse).getValue().intValue());
             break;
         case :
             this. = DERBitString.getInstance(objfalse);
             break;
         case :
             this. = PKMACValue.getInstance(objfalse);
             break;
         case :
             this. = EnvelopedData.getInstance(objfalse);
             break;
         default:
             throw new IllegalArgumentException("unknown tag in POPOPrivKey");
         }
     }
 
     public static POPOPrivKey getInstance(Object obj)
     {
         if (obj instanceof POPOPrivKey)
         {
             return (POPOPrivKey)obj;
         }
         if (obj != null)
         {
             return new POPOPrivKey(ASN1TaggedObject.getInstance(obj));
         }
 
         return null;
     }
 
     public static POPOPrivKey getInstance(ASN1TaggedObject objboolean explicit)
     {
         return getInstance(ASN1TaggedObject.getInstance(objexplicit));
     }
 
     public POPOPrivKey(SubsequentMessage msg)
     {
         this. = ;
         this. = msg;
     }
 
     public int getType()
     {
         return ;
     }
 
     public ASN1Encodable getValue()
     {
         return ;
     }

    
 POPOPrivKey ::= CHOICE {
        thisMessage       [0] BIT STRING,         -- Deprecated
         -- possession is proven in this message (which contains the private
         -- key itself (encrypted for the CA))
        subsequentMessage [1] SubsequentMessage,
         -- possession will be proven in a subsequent message
        dhMAC             [2] BIT STRING,         -- Deprecated
        agreeMAC          [3] PKMACValue,
        encryptedKey      [4] EnvelopedData }
 
 
    {
        return new DERTaggedObject(false);
    }
New to GrepCode? Check out our FAQ X