Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.bouncycastle.asn1.cms;
  
RFC 5652: Content encryption key delivery mechanisms.
 RecipientEncryptedKey ::= SEQUENCE {
     rid KeyAgreeRecipientIdentifier,
     encryptedKey EncryptedKey
 }
 
 
 public class RecipientEncryptedKey
     extends ASN1Object
 {
     private ASN1OctetString encryptedKey;
 
     private RecipientEncryptedKey(
         ASN1Sequence seq)
     {
          = KeyAgreeRecipientIdentifier.getInstance(seq.getObjectAt(0));
          = (ASN1OctetString)seq.getObjectAt(1);
     }
    
    
Return an RecipientEncryptedKey object from a tagged object.

Parameters:
obj the tagged object holding the object we want.
explicit true if the object is meant to be explicitly tagged false otherwise.
Throws:
java.lang.IllegalArgumentException if the object held by the tagged object cannot be converted.
 
     public static RecipientEncryptedKey getInstance(
         ASN1TaggedObject    obj,
         boolean             explicit)
     {
         return getInstance(ASN1Sequence.getInstance(objexplicit));
     }
    
    
Return a RecipientEncryptedKey object from the given object.

Accepted inputs:

  • null → null
  • RecipientEncryptedKey object
  • ASN1Sequence input formats with RecipientEncryptedKey structure inside

Parameters:
obj the object we want converted.
Throws:
java.lang.IllegalArgumentException if the object cannot be converted.
 
     public static RecipientEncryptedKey getInstance(
         Object obj)
     {
         if (obj instanceof RecipientEncryptedKey)
         {
             return (RecipientEncryptedKey)obj;
         }
         
         if (obj != null)
         {
             return new RecipientEncryptedKey(ASN1Sequence.getInstance(obj));
         }
         
         return null;
     } 
 
     public RecipientEncryptedKey(
         KeyAgreeRecipientIdentifier id,
         ASN1OctetString             encryptedKey)
     {
         this. = id;
         this. = encryptedKey;
     }
 
     {
         return ;
     }
 
     public ASN1OctetString getEncryptedKey()
     {
         return ;
     }

    
Produce an object suitable for an ASN1OutputStream.
 
    {
        ASN1EncodableVector  v = new ASN1EncodableVector();
        v.add();
        v.add();
        return new DERSequence(v);
    }
New to GrepCode? Check out our FAQ X