public String encrypt(String data, String encryptType) throws Exception {
        Cipher cipher = getPattern(encryptType, ENCRYPT_MODE);
        byte[] pasByte = cipher.doFinal(data.getBytes("UTF-8"));
        return Base64.getEncoder().encodeToString(pasByte);
    }
String des encryption
@param data String that needs to be encrypted
@param encryptType encryption mode (ECB/CBC/OFB/CFB)
@return Encryption result
@throws Exception exception
@author sucb
@date March 2, 2017 7:47:37 pm
chat2db-server/chat2db-server-domain/chat2db-server-domain-core/src/main/java/ai/chat2db/server/domain/core/util/DesUtil.java