Java String Encrypt encryptBankCardNoLast4Bits(String cardNo)

Here you can find the source of encryptBankCardNoLast4Bits(String cardNo)

Description

encrypt Bank Card No Last Bits

License

Apache License

Declaration

public static String encryptBankCardNoLast4Bits(String cardNo) 

Method Source Code

//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);
    }
}

Related

  1. Encrypt(String str, String salt)
  2. encrypt(String string)
  3. encrypt(String string)
  4. encrypt0(final byte[] result)
  5. encryptBankCardNo(String cardNo)
  6. encryptBytes(final byte[] b, final int i)
  7. encryptChar(String caracter, int variable, int indice)
  8. EncryptDecrypt(String value)
  9. encryptEmailId(String emailId)