Here you can find the source of encryptBankCardNoLast4Bits(String cardNo)
public static String encryptBankCardNoLast4Bits(String cardNo)
//package com.java2s; //License from project: Apache License public class Main { private static final int DEFAULT_CARD_NUMBER_DISPLAY_LENGTH = 4; public static String encryptBankCardNoLast4Bits(String cardNo) { if (cardNo == null || cardNo.length() <= DEFAULT_CARD_NUMBER_DISPLAY_LENGTH) { return cardNo; }/* w w w. j a v a 2 s . c o m*/ return cardNo.substring(cardNo.length() - DEFAULT_CARD_NUMBER_DISPLAY_LENGTH); } }