bytes[0] = (byte)0x3f;
bytes[0] = (byte)0x7f;
    private void testEnc(        int         size,        int         privateValueSize,        BigInteger  g,        BigInteger  p)    {        ElGamalParameters                dhParams = new ElGamalParameters(p, g, privateValueSize);        ElGamalKeyGenerationParameters   params = new ElGamalKeyGenerationParameters(new SecureRandom(), dhParams);        ElGamalKeyPairGenerator          kpGen = new ElGamalKeyPairGenerator();        kpGen.init(params);        //        // generate pair        //        AsymmetricCipherKeyPair         pair = kpGen.generateKeyPair();        ElGamalPublicKeyParameters      pu = (ElGamalPublicKeyParameters)pair.getPublic();        ElGamalPrivateKeyParameters     pv = (ElGamalPrivateKeyParameters)pair.getPrivate();        checkKeySize(privateValueSize, pv);        ElGamalEngine    e = new ElGamalEngine();        e.init(true, pu);                if (e.getOutputBlockSize() != size / 4)        {            fail(size + " getOutputBlockSize() on encryption failed.");        }        String  message = "This is a test";        byte[]  pText = message.getBytes();        byte[]  cText = e.processBlock(pText, 0, pText.length);        e.init(false, pv);        if (e.getOutputBlockSize() != (size / 8) - 1)        {            fail(size + " getOutputBlockSize() on decryption failed.");        }                pText = e.processBlock(cText, 0, cText.length);        if (!message.equals(new String(pText)))        {            fail(size + " bit test failed");        }                e.init(true, pu);        byte[] bytes = new byte[e.getInputBlockSize() + 2];                try        {            e.processBlock(bytes, 0, bytes.length);                        fail("out of range block not detected");        }        catch (DataLengthException ex)        {            // expected        }                try        {            bytes[0] = (byte)0xff;                        e.processBlock(bytes, 0, bytes.length - 1);                        fail("out of range block not detected");        }        catch (DataLengthException ex)        {            // expected        }                try        {            bytes[0] = (byte)0x3f;            e.processBlock(bytes, 0, bytes.length - 1);        }        catch (DataLengthException ex)        {            fail("in range block failed");        }    }