Example usage for org.apache.commons.math.random RandomDataImpl nextHexString

List of usage examples for org.apache.commons.math.random RandomDataImpl nextHexString

Introduction

In this page you can find the example usage for org.apache.commons.math.random RandomDataImpl nextHexString.

Prototype

public String nextHexString(int len) 

Source Link

Document

Algorithm Description: hex strings are generated using a 2-step process.

Usage

From source file:org.topazproject.ambra.service.password.PasswordDigestService.java

private String createRandomSalt() {
    final RandomDataImpl random = new RandomDataImpl();
    final int saltLength = getSaltLength();
    return saltLength == 0 ? "" : random.nextHexString(saltLength);
}