com.atlassian.security.password
Class RandomSaltGenerator

java.lang.Object
  extended by com.atlassian.security.password.RandomSaltGenerator
All Implemented Interfaces:
SaltGenerator

public final class RandomSaltGenerator
extends Object
implements SaltGenerator

Generates a salt using a static instance of Random. Because Random is thread-safe, salt generation using this class is also thread-safe.

Clients should not use this class directly, but pass an instance to DefaultPasswordEncoder.


Constructor Summary
RandomSaltGenerator()
           
 
Method Summary
 byte[] generateSalt(int length)
          Returns a byte array of the required length containing a random salt value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomSaltGenerator

public RandomSaltGenerator()
Method Detail

generateSalt

public byte[] generateSalt(int length)
Description copied from interface: SaltGenerator
Returns a byte array of the required length containing a random salt value.

Specified by:
generateSalt in interface SaltGenerator


Copyright © 2013 Atlassian. All Rights Reserved.