package com.ywt.outpatient.core.utils;

public class BankCardUtil {

    //先对cardNo进行脱敏处理,保留最后四位号码
    public static String getDesensitizationCardNo(String cardNo){
        String newCardNo = "";
        for (int n = 0, m = cardNo.trim().length() - 4; n < m; n++)
            newCardNo = newCardNo.concat("*");

        return newCardNo.concat(cardNo.substring(cardNo.length() - 4, cardNo.length()));
    }
}
