FileDocCategorySizeDatePackage
CAST5CBCParameters.javaAPI DocAzureus 3.0.3.41725Tue Jun 08 05:13:00 BST 2004org.bouncycastle.asn1.misc

CAST5CBCParameters

public class CAST5CBCParameters extends Object implements DEREncodable

Fields Summary
DERInteger
keyLength
ASN1OctetString
iv
Constructors Summary
public CAST5CBCParameters(byte[] iv, int keyLength)

        this.iv = new DEROctetString(iv);
        this.keyLength = new DERInteger(keyLength);
    
public CAST5CBCParameters(ASN1Sequence seq)

        iv = (ASN1OctetString)seq.getObjectAt(0);
        keyLength = (DERInteger)seq.getObjectAt(1);
    
Methods Summary
public DERObjectgetDERObject()
Produce an object suitable for an ASN1OutputStream.
cast5CBCParameters ::= SEQUENCE {
iv OCTET STRING DEFAULT 0,
-- Initialization vector
keyLength INTEGER
-- Key length, in bits
}

        ASN1EncodableVector  v = new ASN1EncodableVector();

        v.add(iv);
        v.add(keyLength);

        return new DERSequence(v);
    
public byte[]getIV()

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

        if (o instanceof CAST5CBCParameters)
        {
            return (CAST5CBCParameters)o;
        }
        else if (o instanceof ASN1Sequence)
        {
            return new CAST5CBCParameters((ASN1Sequence)o);
        }

        throw new IllegalArgumentException("unknown object in CAST5CBCParameter factory");
    
public intgetKeyLength()

        return keyLength.getValue().intValue();