Ticket #269: SecureRandomSaltUtility style fixes.

This commit is contained in:
Michael Jumper
2013-02-22 20:55:17 -08:00
parent fec96bcbd6
commit 1a6d9dae20

View File

@@ -1,3 +1,6 @@
package net.sourceforge.guacamole.net.auth.mysql.utility;
/* ***** BEGIN LICENSE BLOCK ***** /* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
* *
@@ -33,17 +36,19 @@
* the terms of any one of the MPL, the GPL or the LGPL. * the terms of any one of the MPL, the GPL or the LGPL.
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
package net.sourceforge.guacamole.net.auth.mysql.utility;
import java.security.SecureRandom; import java.security.SecureRandom;
/** /**
* Generates password salts via the SecureRandom utility. * Generates password salts via SecureRandom.
* @author James Muehlner * @author James Muehlner
*/ */
public class SecureRandomSaltUtility implements SaltUtility { public class SecureRandomSaltUtility implements SaltUtility {
SecureRandom secureRandom = new SecureRandom(); /**
* Instance of SecureRandom for generating the salt.
*/
private SecureRandom secureRandom = new SecureRandom();
@Override @Override
public byte[] generateSalt() { public byte[] generateSalt() {
@@ -51,4 +56,5 @@ public class SecureRandomSaltUtility implements SaltUtility {
secureRandom.nextBytes(salt); secureRandom.nextBytes(salt);
return salt; return salt;
} }
} }