// md5
import org.apache.commons.codec.digest.DigestUtils; String str = "${appid}" + "${appkey}" + "${salt}"; String sign = DigestUtils.md5Hex(str); vars.put("sign",sign);
// sha256
import org.apache.commons.codec.digest.DigestUtils; String keytoSign = "需要进行加密的字符串"; String sign = DigestUtils.sha256Hex(keytoSign); log.info("================"+sign); vars.put("sign",sign);