FileDocCategorySizeDatePackage
MyMacSpi.javaAPI DocAndroid 1.5 API2175Wed May 06 22:41:02 BST 2009org.apache.harmony.crypto.tests.support

MyMacSpi

public class MyMacSpi extends MacSpi
Additional class for verification of MacGeneratorSpi and MacSpi

Fields Summary
private int
length
Constructors Summary
Methods Summary
protected byte[]engineDoFinal()

        return new byte[length];
    
protected intengineGetMacLength()

    
       
        return length;
    
protected voidengineInit(java.security.Key key, java.security.spec.AlgorithmParameterSpec params)

        if (params == null) {
            if (!(key instanceof SecretKeySpec)) {
                throw new IllegalArgumentException("params is null and key is SecretKeySpec");
            }
        }
    
protected voidengineReset()

        length++;
    
protected voidengineUpdate(byte input)

    
protected voidengineUpdate(byte[] input, int offset, int len)

        if (offset >= 0 && len >= 0) {
            length = len;
        }