Example usage for org.bouncycastle.asn1.cms EnvelopedData getInstance

List of usage examples for org.bouncycastle.asn1.cms EnvelopedData getInstance

Introduction

In this page you can find the example usage for org.bouncycastle.asn1.cms EnvelopedData getInstance.

Prototype

public static EnvelopedData getInstance(ASN1TaggedObject obj, boolean explicit) 

Source Link

Document

Return an EnvelopedData object from a tagged object.

Usage

From source file:com.novosec.pkix.asn1.crmf.EncryptedKey.java

License:Open Source License

public static EncryptedKey getInstance(ASN1TaggedObject tagObj, boolean explicit) {
    int tag = (tagObj == null ? -1 : tagObj.getTagNo());
    switch (tag) {
    case TAGNO_ENV_DATA:
        return new EncryptedKey(EnvelopedData.getInstance(tagObj, explicit));
    default://from ww w . j  ava 2 s .  com
        return new EncryptedKey(EncryptedValue.getInstance(tagObj, explicit));
    }
}