Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.bouncycastle.asn1.cms;
  
RFC 5652: Content encryption key delivery mechanisms.

 OriginatorPublicKey ::= SEQUENCE {
     algorithm AlgorithmIdentifier,
     publicKey BIT STRING 
 }
 
 
 public class OriginatorPublicKey
     extends ASN1Object
 {
     private AlgorithmIdentifier algorithm;
     private DERBitString        publicKey;
     
     public OriginatorPublicKey(
         AlgorithmIdentifier algorithm,
         byte[]              publicKey)
     {
         this. = algorithm;
         this. = new DERBitString(publicKey);
     }

    

Deprecated:
use getInstance()
 
     public OriginatorPublicKey(
         ASN1Sequence seq)
     {
          = AlgorithmIdentifier.getInstance(seq.getObjectAt(0));
          = (DERBitString)seq.getObjectAt(1);
     }
    
    
Return an OriginatorPublicKey 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 OriginatorPublicKey getInstance(
         ASN1TaggedObject    obj,
         boolean             explicit)
     {
         return getInstance(ASN1Sequence.getInstance(objexplicit));
     }
    
    
Return an OriginatorPublicKey object from the given object.

Accepted inputs:

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

Parameters:
obj the object we want converted.
Throws:
java.lang.IllegalArgumentException if the object cannot be converted.
 
     public static OriginatorPublicKey getInstance(
         Object obj)
     {
         if (obj instanceof OriginatorPublicKey)
         {
             return (OriginatorPublicKey)obj;
         }
         
         if (obj != null)
         {
             return new OriginatorPublicKey(ASN1Sequence.getInstance(obj));
         }
 
         return null;
     } 
 
     public AlgorithmIdentifier getAlgorithm()
     {
         return ;
     }
 
     public DERBitString getPublicKey()
     {
         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