package com.usky.issue.service.util;

/**
 * 凭证脱敏工具
 *
 * @author fyc
 * @date 2026-05-21
 */
public final class CredentialMaskUtil {

    private CredentialMaskUtil() {
    }

    public static String mask(String value) {
        if (value == null || value.isEmpty()) {
            return "****";
        }
        if (value.length() <= 4) {
            return "****";
        }
        return value.substring(0, 2) + "****" + value.substring(value.length() - 2);
    }
}
