Java ID Value Create generateSalt()

Here you can find the source of generateSalt()

Description

Generates a random string

License

Open Source License

Declaration

public static String generateSalt() 

Method Source Code

//package com.java2s;
/*/*w  w  w .  j av  a  2  s  .c om*/
 * This file is part of "U Turismu" project. 
 * 
 * U Turismu is an enterprise application in support of calabrian tour operators.
 * This system aims to promote tourist services provided by the operators
 * and to develop and improve tourism in Calabria.
 *
 * Copyright (C) 2012 "LagrecaSpaccarotella" team.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

import java.util.Random;

public class Main {
    /**
     * Generates a random string
     */
    public static String generateSalt() {
        return Long.toHexString(new Random(System.nanoTime()).nextLong());
    }
}

Related

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