private static String getCipherTransformationWithNoPadding(String transformation) {
        // The transformation is assumed to be in the Algorithm/Mode/Padding format.
        int paddingModeDelimiterIndex = transformation.lastIndexOf('/');
        if (paddingModeDelimiterIndex == -1) {
            fail("No padding mode delimiter: " + transformation);
        }
        String paddingMode = transformation.substring(paddingModeDelimiterIndex + 1);
        if (!paddingMode.toLowerCase(Locale.ROOT).endsWith("padding")) {
            fail("No padding mode specified:" + transformation);
        }
        return transformation.substring(0, paddingModeDelimiterIndex) + "/NoPadding";
    }
Gets the Cipher transformation with the same algorithm and mode as the provided one but
which uses no padding.
common/src/test/java/org/conscrypt/javax/crypto/CipherTest.java