Android Random Byte Array generateSalt()

Here you can find the source of generateSalt()

Description

generate Salt

Declaration

private static byte[] generateSalt() 

Method Source Code

//package com.java2s;

import java.security.SecureRandom;

public class Main {
    private static final SecureRandom RANDOM = new SecureRandom();

    private static byte[] generateSalt() {
        byte[] salt = new byte[24];
        RANDOM.nextBytes(salt);//from w  ww.jav a  2 s  .c  o m
        return salt;
    }
}

Related

  1. getRandomByteArrays(int arrSize)
  2. randomInt(int min, int max)
  3. randomStr(int length)
  4. randomStr(int length)
  5. generateSalt()
  6. getRandomBytes(final int size)