mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Ticket #269: SecureRandomSaltUtility style fixes.
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user