Here you can find the source of getSalt()
public static String getSalt()
//package com.java2s; //License from project: Open Source License import java.util.Random; public class Main { private static final String[] SALEARR = { "q", "a", "z", "w", "s", "x", "e", "d", "c", "r", "f", "v", "t", "g", "b", "y", "h", "n", "u", "j", "m", "i", "k", "o", "l", "p", "_" }; public static String getSalt() { Random random = new Random(); StringBuilder sb = new StringBuilder(""); for (int i = 0; i < 6; i++) { sb.append(SALEARR[random.nextInt(26)]); }/*w w w . j av a2s . c o m*/ return sb.toString(); } }