Java ID Value Create generateSalt()

Here you can find the source of generateSalt()

Description

generate Salt

License

Open Source License

Declaration

public static String generateSalt() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Random;

public class Main {
    public static String generateSalt() {
        StringBuilder builder = new StringBuilder();
        Random random = new Random();

        final char[] chars = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz+/1234567890".toCharArray();

        for (int i = 0; i < 32; i++) {
            builder.append(chars[random.nextInt(chars.length)]);
        }/*from w ww.j a v a 2  s.c om*/
        return builder.toString();
    }
}

Related

  1. generateId()
  2. generateID(final String message)
  3. generateID(int seed)
  4. generateID(String origin)
  5. generateId(String salt)
  6. generateSalt()
  7. generateSalt()
  8. generateUniqueId()
  9. generateUniqueId()