class LarkNotifier extends AbstractHttpNotifier {

    /**
     * LF
     */
    public static final String LF = "\n";

    /**
     * HmacSHA256 encryption algorithm
     */
    public static final String HMAC_SHA_256 = "HmacSHA256";

    @Override
    public String platform() {
        return NotifyPlatformEnum.LARK.name().toLowerCase();
    }

    /**
     * get signature
     *
     * @param secret    secret
     * @param timestamp timestamp
     * @return signature
     * @throws NoSuchAlgorithmException Mac.getInstance("HmacSHA256")
     * @throws InvalidKeyException      mac.init(java.security.Key)
     */
    protected String genSign(String secret, Long timestamp) throws NoSuchAlgorithmException, InvalidKeyException {
        String stringToSign = timestamp + LF + secret;
        Mac mac = Mac.getInstance(HMAC_SHA_256);
        mac.init(new SecretKeySpec(stringToSign.getBytes(StandardCharsets.UTF_8), HMAC_SHA_256));
        byte[] signData = mac.doFinal(new byte[]{});
        return new String(Base64.encodeBase64(signData));
    }

    @Override
    protected String buildMsgBody(NotifyPlatform platform, String content) {<FILL_FUNCTION_BODY>}

    @Override
    protected String buildUrl(NotifyPlatform platform) {
        if (StringUtils.isBlank(platform.getUrlKey())) {
            return platform.getWebhook();
        }
        UrlBuilder builder = UrlBuilder.of(Optional.ofNullable(platform.getWebhook()).orElse(LarkNotifyConst.LARK_WEBHOOK));
        List<String> segments = builder.getPath().getSegments();
        if (!Objects.equals(platform.getUrlKey(), segments.get(segments.size() - 1))) {
           builder.addPath(platform.getUrlKey());
        }
        return builder.build();
    }
}

        if (StringUtils.isBlank(platform.getSecret())) {
            return content;
        }
        try {
            val secondsTimestamp = System.currentTimeMillis() / 1000;
            val sign = genSign(platform.getSecret(), secondsTimestamp);
            content = content.replaceFirst(SIGN_REPLACE, String.format(SIGN_PARAM_PREFIX, secondsTimestamp, sign));
        } catch (NoSuchAlgorithmException | InvalidKeyException e) {
            log.error("DynamicTp notify, lark generate signature failed...", e);
        }
        return content;
    
<methods>public non-sealed void <init>() <variables>