All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bouncycastle.asn1.ess.ContentIdentifier Maven / Gradle / Ivy

Go to download

The FIPS 140-3 Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms certified to FIPS 140-3 level 1. This jar contains JCE provider and low-level API for the BC-FJA version 2.0.0, FIPS Certificate #4743. Please see certificate for certified platform details.

There is a newer version: 2.0.0
Show newest version
/***************************************************************/
/******    DO NOT EDIT THIS CLASS bc-java SOURCE FILE     ******/
/***************************************************************/
package org.bouncycastle.asn1.ess;

import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1OctetString;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.DEROctetString;

public class ContentIdentifier
    extends ASN1Object
{
     ASN1OctetString value;

    public static ContentIdentifier getInstance(Object o)
    {
        if (o instanceof ContentIdentifier)
        {
            return (ContentIdentifier) o;
        }
        else if (o != null)
        {
            return new ContentIdentifier(ASN1OctetString.getInstance(o));
        }

        return null;
    }

    /**
     * Create from OCTET STRING whose octets represent the identifier.
     */
    private ContentIdentifier(
        ASN1OctetString value)
    {
        this.value = value;
    }

    /**
     * Create from byte array representing the identifier.
     */
    public ContentIdentifier(
        byte[] value)
    {
        this(new DEROctetString(value));
    }
    
    public ASN1OctetString getValue()
    {
        return value;
    }

    /**
     * The definition of ContentIdentifier is
     * 
     * ContentIdentifier ::=  OCTET STRING
     * 
* id-aa-contentIdentifier OBJECT IDENTIFIER ::= { iso(1) * member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9) * smime(16) id-aa(2) 7 } */ public ASN1Primitive toASN1Primitive() { return value; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy