Java Salt Value Create generateSalt()

Here you can find the source of generateSalt()

Description

generate Salt

License

Apache License

Declaration

public static byte[] generateSalt() 

Method Source Code

//package com.java2s;
//     Licensed under the Apache License, Version 2.0 (the "License");

import java.security.SecureRandom;

public class Main {
    public static byte[] generateSalt() {
        SecureRandom random = new SecureRandom();
        byte salt[] = new byte[32];
        random.nextBytes(salt);/*  w  w  w . ja  v  a 2 s.c o  m*/
        return salt;
    }
}

Related

  1. generateSalt()
  2. generateSalt()
  3. generateSalt()
  4. generateSalt()
  5. generateSalt()
  6. generateSalt(final Integer size)
  7. generateSalt(int bits)
  8. generateSalt(int byteSize)
  9. generateSalt(int length)