Example usage for org.springframework.security.crypto.bcrypt BCrypt gensalt

List of usage examples for org.springframework.security.crypto.bcrypt BCrypt gensalt

Introduction

In this page you can find the example usage for org.springframework.security.crypto.bcrypt BCrypt gensalt.

Prototype

public static String gensalt(int log_rounds, SecureRandom random) throws IllegalArgumentException 

Source Link

Document

Generate a salt for use with the BCrypt.hashpw() method

Usage

From source file:org.vjso.security.util.SecurityUtilities.java

/**
 * Generates a random salt
 * @return a string representing the salt
 */
public static String getSalt() {
    return BCrypt.gensalt(LOG_ROUNDS, random);
}