Here you can find the source of generateSaltAESPBKDF2()
Parameter | Description |
---|---|
String | a parameter |
Parameter | Description |
---|---|
Exception | an exception |
public static String generateSaltAESPBKDF2()
//package com.java2s; /**/*from w ww .ja va 2 s .c o m*/ * Copyright (C) 2013 Company. All Rights Reserved. * * This software is the proprietary information of Company . * Use is subjected to license terms. * * @since Jul 14, 2013 8:27:33 PM * @author SPA * */ import java.security.SecureRandom; public class Main { /** * * This method is used for generate slat * * @param String * @return String * @throws Exception */ public static String generateSaltAESPBKDF2() { SecureRandom random = new SecureRandom(); byte bytes[] = new byte[20]; random.nextBytes(bytes); return new String(bytes); } }