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

org.bouncycastle.asn1.its.SymmAlgorithm Maven / Gradle / Ivy

Go to download

The Bouncy Castle Java APIs for ASN.1 extension and utility APIs used to support bcpkix and bctls with the BC FIPS provider. The APIs may also be used with other providers although if being used in a FIPS context it is the responsibility of the user to ensure that any other providers used are FIPS certified and used appropriately.

There is a newer version: 2.0.3
Show newest version
package org.bouncycastle.asn1.its;

import org.bouncycastle.asn1.ASN1Enumerated;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1Primitive;

public class SymmAlgorithm
    extends ASN1Object
{
    public static SymmAlgorithm aes128Ccm = new SymmAlgorithm(new ASN1Enumerated(0));
    private ASN1Enumerated symmAlgorithm;

    private SymmAlgorithm(ASN1Enumerated symmAlgorithm)
    {
        this.symmAlgorithm = symmAlgorithm;
    }

    public SymmAlgorithm(int ordinal)
    {
        this.symmAlgorithm = new ASN1Enumerated(ordinal);
    }

    public SymmAlgorithm getInstance(Object src)
    {
        if (src == null)
        {
            return null;
        }
        else if (src instanceof SymmAlgorithm)
        {
            return (SymmAlgorithm)src;
        }
        else
        {
            return new SymmAlgorithm(ASN1Enumerated.getInstance(src));
        }
    }

    public ASN1Enumerated getSymmAlgorithm()
    {
        return symmAlgorithm;
    }

    public void setSymmAlgorithm(ASN1Enumerated symmAlgorithm)
    {
        this.symmAlgorithm = symmAlgorithm;
    }

    public ASN1Primitive toASN1Primitive()
    {
        return symmAlgorithm.toASN1Primitive();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy