private static void addRsaOaepTest(String digest, MGF1ParameterSpec mgf1Spec, byte[] vector, byte[] label) {
        final PSource pSource;
        if (label == null) {
            pSource = PSource.PSpecified.DEFAULT;
        } else {
            pSource = new PSource.PSpecified(label);
        }

        if (mgf1Spec.getDigestAlgorithm().equals(digest) && label == null) {
            RSA_OAEP_CIPHER_TEST_PARAMS.add(new OAEPCipherTestParam(
                    "RSA/ECB/OAEPWith" + digest + "AndMGF1Padding",
                    null,
                    (PublicKey) getEncryptKey("RSA"),
                    (PrivateKey) getDecryptKey("RSA"),
                    RSA_Vector2_Plaintext,
                    vector));
        }

        RSA_OAEP_CIPHER_TEST_PARAMS.add(new OAEPCipherTestParam(
                "RSA/ECB/OAEPWith" + digest + "AndMGF1Padding",
                new OAEPParameterSpec(digest, "MGF1", mgf1Spec, pSource),
                (PublicKey) getEncryptKey("RSA"),
                (PrivateKey) getDecryptKey("RSA"),
                RSA_Vector2_Plaintext,
                vector));

        RSA_OAEP_CIPHER_TEST_PARAMS.add(new OAEPCipherTestParam(
                "RSA/ECB/OAEPPadding",
                new OAEPParameterSpec(digest, "MGF1", mgf1Spec, pSource),
                (PublicKey) getEncryptKey("RSA"),
                (PrivateKey) getDecryptKey("RSA"),
                RSA_Vector2_Plaintext,
                vector));
    }
openssl rsautl -raw -sign -inkey rsa.key | recode ../x1 | sed 's/0x/(byte) 0x/g'
common/src/test/java/org/conscrypt/javax/crypto/CipherTest.java