private static String encrypt(final String strategyName, final String key, final String data) {
        try {
            return newInstance(strategyName).encrypt(key, data);
        } catch (Exception e) {
            LOG.error("encrypt data error: ", e);
            return null;
        }
    }
Encrypt string.

@param strategyName the strategy name
@param key the key
@param data the data
@return the string
shenyu-plugin/shenyu-plugin-security/shenyu-plugin-cryptor/src/main/java/org/apache/shenyu/plugin/cryptor/strategy/CryptorStrategyFactory.java