FileDocCategorySizeDatePackage
MacData.javaAPI DocAzureus 3.0.3.42136Tue Jun 08 05:12:58 BST 2004org.bouncycastle.asn1.pkcs

MacData

public class MacData extends Object implements org.bouncycastle.asn1.DEREncodable

Fields Summary
org.bouncycastle.asn1.x509.DigestInfo
digInfo
byte[]
salt
BigInteger
iterationCount
Constructors Summary
public MacData(org.bouncycastle.asn1.ASN1Sequence seq)

        this.digInfo = DigestInfo.getInstance(seq.getObjectAt(0));

        this.salt = ((ASN1OctetString)seq.getObjectAt(1)).getOctets();

        if (seq.size() == 3)
        {
            this.iterationCount = ((DERInteger)seq.getObjectAt(2)).getValue();
        }
        else
        {
            this.iterationCount = BigInteger.valueOf(1);
        }
    
public MacData(org.bouncycastle.asn1.x509.DigestInfo digInfo, byte[] salt, int iterationCount)

        this.digInfo = digInfo;
        this.salt = salt;
        this.iterationCount = BigInteger.valueOf(iterationCount);
    
Methods Summary
public org.bouncycastle.asn1.DERObjectgetDERObject()

        ASN1EncodableVector  v = new ASN1EncodableVector();

        v.add(digInfo);
        v.add(new DEROctetString(salt));
        v.add(new DERInteger(iterationCount));

        return new DERSequence(v);
    
public static org.bouncycastle.asn1.pkcs.MacDatagetInstance(java.lang.Object obj)

        if (obj instanceof MacData)
        {
            return (MacData)obj;
        }
        else if (obj instanceof ASN1Sequence)
        {
            return new MacData((ASN1Sequence)obj);
        }

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

        return iterationCount;
    
public org.bouncycastle.asn1.x509.DigestInfogetMac()

        return digInfo;
    
public byte[]getSalt()

        return salt;