Java Salt Value Create createSalt()

Here you can find the source of createSalt()

Description

create Salt

License

LGPL

Declaration

public static final byte[] createSalt() throws Exception 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.util.Random;

public class Main {

    public static final byte[] createSalt() throws Exception {
        byte[] salt = new byte[8];
        Random random = new Random();
        random.nextBytes(salt);/*from  w  ww .j a va  2 s .  co m*/
        return salt;
    }
}

Related

  1. createSalt(int byte_length)
  2. generateSalt()
  3. generateSalt()
  4. generateSalt()