private void logTestFailure(PrintStream logStream, String provider, CipherTestParam params,
            Throwable e) {
        logStream.append("Error encountered checking " + params.transformation);

        if (params.encryptKey instanceof SecretKey) {
            logStream.append(", keySize=" + (params.encryptKey.getEncoded().length * 8));
        }

        if (params.spec instanceof OAEPParameterSpec) {
            OAEPParameterSpec oaepSpec = (OAEPParameterSpec) params.spec;
            logStream.append(", OAEPSpec{digest=" + oaepSpec.getDigestAlgorithm() + ", mgfAlg="
                    + oaepSpec.getMGFAlgorithm());
            if (oaepSpec.getMGFParameters() instanceof MGF1ParameterSpec) {
                MGF1ParameterSpec mgf1Spec = (MGF1ParameterSpec) oaepSpec.getMGFParameters();
                logStream.append(", mgf1Hash=" + mgf1Spec.getDigestAlgorithm());
            }
            logStream.append(", pSource=");
            PSource pSource = oaepSpec.getPSource();
            logStream.append(pSource.getAlgorithm());
            if (pSource.getAlgorithm().equals("PSpecified")) {
                logStream.append(":{");
                logStream.append(Arrays.toString(((PSource.PSpecified) pSource).getValue()));
                logStream.append('}');
            }
            logStream.append('}');
        }

        logStream.append(" with provider " + provider + "\n");
        e.printStackTrace(logStream);
    }
For each test vector in the list, tests that the transformation is supported by at least one
provider and that all implementations of the transformation pass the Known Answer Test (KAT)
as well as other functional tests.
common/src/test/java/org/conscrypt/javax/crypto/CipherTest.java