FileDocCategorySizeDatePackage
RC2CBCParameter.javaAPI DocAndroid 1.5 API1965Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.pkcs

RC2CBCParameter

public class RC2CBCParameter extends org.bouncycastle.asn1.ASN1Encodable

Fields Summary
org.bouncycastle.asn1.DERInteger
version
org.bouncycastle.asn1.ASN1OctetString
iv
Constructors Summary
public RC2CBCParameter(byte[] iv)

        this.version = null;
        this.iv = new DEROctetString(iv);
    
public RC2CBCParameter(int parameterVersion, byte[] iv)

        this.version = new DERInteger(parameterVersion);
        this.iv = new DEROctetString(iv);
    
public RC2CBCParameter(org.bouncycastle.asn1.ASN1Sequence seq)

        if (seq.size() == 1)
        {
            version = null;
            iv = (ASN1OctetString)seq.getObjectAt(0);
        }
        else
        {
            version = (DERInteger)seq.getObjectAt(0);
            iv = (ASN1OctetString)seq.getObjectAt(1);
        }
    
Methods Summary
public byte[]getIV()

        return iv.getOctets();
    
public static org.bouncycastle.asn1.pkcs.RC2CBCParametergetInstance(java.lang.Object o)

        if (o instanceof ASN1Sequence)
        {
            return new RC2CBCParameter((ASN1Sequence)o);
        }

        throw new IllegalArgumentException("unknown object in RC2CBCParameter factory");
    
public java.math.BigIntegergetRC2ParameterVersion()

        if (version == null)
        {
            return null;
        }

        return version.getValue();
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()

        ASN1EncodableVector  v = new ASN1EncodableVector();

        if (version != null)
        {
            v.add(version);
        }

        v.add(iv);

        return new DERSequence(v);