@Override
    protected void engineSetMode(String modeStr) throws NoSuchAlgorithmException {
        final Mode mode;
        try {
            mode = Mode.getNormalized(modeStr);
        } catch (IllegalArgumentException e) {
            NoSuchAlgorithmException newE = new NoSuchAlgorithmException("No such mode: " + modeStr);
            newE.initCause(e);
            throw newE;
        }
        checkSupportedMode(mode);
        this.mode = mode;
    }
Checks whether the cipher supports this particular cipher {@code padding}
and throws {@code NoSuchPaddingException} if it doesn't.
common/src/main/java/org/conscrypt/OpenSSLCipher.java