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

MyExemptionMechanismSpi

public class MyExemptionMechanismSpi extends ExemptionMechanismSpi
Additional class for verification ExemptionMechanismSpi and ExemptionMechanism classes

Fields Summary
private static final int
byteArrayLength
Constructors Summary
Methods Summary
protected byte[]engineGenExemptionBlob()

        return new byte[byteArrayLength];
    
protected intengineGenExemptionBlob(byte[] output, int outputOffset)

        return byteArrayLength;
    
protected intengineGetOutputSize(int inputLen)

        return 10;
    
protected voidengineInit(java.security.Key key)

        if (key == null) {
            throw new InvalidKeyException("key is null");
        }
        if (!(key instanceof tmpKey)) {
            throw new ExemptionMechanismException("Incorrect key");
        }
    
protected voidengineInit(java.security.Key key, java.security.AlgorithmParameters params)

        if (key == null) {
            throw new InvalidKeyException("key is null");            
        }
        if (!(key instanceof tmpKey)) {
            throw new ExemptionMechanismException("Incorrect key");
        }
        if (params == null) {
            throw new InvalidAlgorithmParameterException("params is null");
        }
    
protected voidengineInit(java.security.Key key, java.security.spec.AlgorithmParameterSpec params)

        if (key == null) {
            throw new InvalidKeyException("key is null");
        }
        if (!(key instanceof tmpKey)) {
            throw new ExemptionMechanismException("Incorrect key");
        }
        if (params == null) {
            throw new InvalidAlgorithmParameterException("params is null");
        }
    
public static final intgetLength()

    
         
        return byteArrayLength;