mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 03:05:17 +01:00
Reformatted all code files, cleaned up the project
This commit is contained in:
parent
cffcafd36b
commit
2e868c7492
@ -29,10 +29,10 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* PermissionsManager.
|
* PermissionsManager.
|
||||||
* <p>
|
* <p/>
|
||||||
* A permissions manager, to manage and use various permissions systems.
|
* A permissions manager, to manage and use various permissions systems.
|
||||||
* This manager supports dynamic plugin hooking and various other features.
|
* This manager supports dynamic plugin hooking and various other features.
|
||||||
* <p>
|
* <p/>
|
||||||
* Written by Tim Visée.
|
* Written by Tim Visée.
|
||||||
*
|
*
|
||||||
* @author Tim Visée, http://timvisee.com
|
* @author Tim Visée, http://timvisee.com
|
||||||
|
@ -21,37 +21,37 @@ import java.security.SecureRandom;
|
|||||||
* BCrypt implements OpenBSD-style Blowfish password hashing using the scheme
|
* BCrypt implements OpenBSD-style Blowfish password hashing using the scheme
|
||||||
* described in "A Future-Adaptable Password Scheme" by Niels Provos and David
|
* described in "A Future-Adaptable Password Scheme" by Niels Provos and David
|
||||||
* Mazieres.
|
* Mazieres.
|
||||||
* <p>
|
* <p/>
|
||||||
* This password hashing system tries to thwart off-line password cracking using
|
* This password hashing system tries to thwart off-line password cracking using
|
||||||
* a computationally-intensive hashing algorithm, based on Bruce Schneier's
|
* a computationally-intensive hashing algorithm, based on Bruce Schneier's
|
||||||
* Blowfish cipher. The work factor of the algorithm is parameterised, so it can
|
* Blowfish cipher. The work factor of the algorithm is parameterised, so it can
|
||||||
* be increased as computers get faster.
|
* be increased as computers get faster.
|
||||||
* <p>
|
* <p/>
|
||||||
* Usage is really simple. To hash a password for the first time, call the
|
* Usage is really simple. To hash a password for the first time, call the
|
||||||
* hashpw method with a random salt, like this:
|
* hashpw method with a random salt, like this:
|
||||||
* <p>
|
* <p/>
|
||||||
* <code>
|
* <code>
|
||||||
* String pw_hash = BCrypt.hashpw(plain_password, BCrypt.gensalt()); <br />
|
* String pw_hash = BCrypt.hashpw(plain_password, BCrypt.gensalt()); <br />
|
||||||
* </code>
|
* </code>
|
||||||
* <p>
|
* <p/>
|
||||||
* To check whether a plaintext password matches one that has been hashed
|
* To check whether a plaintext password matches one that has been hashed
|
||||||
* previously, use the checkpw method:
|
* previously, use the checkpw method:
|
||||||
* <p>
|
* <p/>
|
||||||
* <code>
|
* <code>
|
||||||
* if (BCrypt.checkpw(candidate_password, stored_hash))<br />
|
* if (BCrypt.checkpw(candidate_password, stored_hash))<br />
|
||||||
* System.out.println("It matches");<br />
|
* System.out.println("It matches");<br />
|
||||||
* else<br />
|
* else<br />
|
||||||
* System.out.println("It does not match");<br />
|
* System.out.println("It does not match");<br />
|
||||||
* </code>
|
* </code>
|
||||||
* <p>
|
* <p/>
|
||||||
* The gensalt() method takes an optional parameter (log_rounds) that determines
|
* The gensalt() method takes an optional parameter (log_rounds) that determines
|
||||||
* the computational complexity of the hashing:
|
* the computational complexity of the hashing:
|
||||||
* <p>
|
* <p/>
|
||||||
* <code>
|
* <code>
|
||||||
* String strong_salt = BCrypt.gensalt(10)<br />
|
* String strong_salt = BCrypt.gensalt(10)<br />
|
||||||
* String stronger_salt = BCrypt.gensalt(12)<br />
|
* String stronger_salt = BCrypt.gensalt(12)<br />
|
||||||
* </code>
|
* </code>
|
||||||
* <p>
|
* <p/>
|
||||||
* The amount of work increases exponentially (2**log_rounds), so each increment
|
* The amount of work increases exponentially (2**log_rounds), so each increment
|
||||||
* is twice as much work. The default log_rounds is 10, and the valid range is 4
|
* is twice as much work. The default log_rounds is 10, and the valid range is 4
|
||||||
* to 31.
|
* to 31.
|
||||||
|
@ -2,15 +2,15 @@ package fr.xephi.authme.security.crypts;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The Whirlpool hashing function.
|
* The Whirlpool hashing function.
|
||||||
* <p>
|
* <p/>
|
||||||
* <p>
|
* <p/>
|
||||||
* <b>References</b>
|
* <b>References</b>
|
||||||
* <p>
|
* <p/>
|
||||||
* <p>
|
* <p/>
|
||||||
* The Whirlpool algorithm was developed by <a
|
* The Whirlpool algorithm was developed by <a
|
||||||
* href="mailto:pbarreto@scopus.com.br">Paulo S. L. M. Barreto</a> and <a
|
* href="mailto:pbarreto@scopus.com.br">Paulo S. L. M. Barreto</a> and <a
|
||||||
* href="mailto:vincent.rijmen@cryptomathic.com">Vincent Rijmen</a>.
|
* href="mailto:vincent.rijmen@cryptomathic.com">Vincent Rijmen</a>.
|
||||||
* <p>
|
* <p/>
|
||||||
* See P.S.L.M. Barreto, V. Rijmen, ``The Whirlpool hashing function,'' First
|
* See P.S.L.M. Barreto, V. Rijmen, ``The Whirlpool hashing function,'' First
|
||||||
* NESSIE workshop, 2000 (tweaked version, 2003),
|
* NESSIE workshop, 2000 (tweaked version, 2003),
|
||||||
* <https://www.cosic.esat.kuleuven
|
* <https://www.cosic.esat.kuleuven
|
||||||
@ -19,33 +19,33 @@ package fr.xephi.authme.security.crypts;
|
|||||||
* @author Paulo S.L.M. Barreto
|
* @author Paulo S.L.M. Barreto
|
||||||
* @author Vincent Rijmen.
|
* @author Vincent Rijmen.
|
||||||
* @version 3.0 (2003.03.12)
|
* @version 3.0 (2003.03.12)
|
||||||
* <p>
|
* <p/>
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
* =========
|
* =========
|
||||||
* <p>
|
* <p/>
|
||||||
* Differences from version 2.1:
|
* Differences from version 2.1:
|
||||||
* <p>
|
* <p/>
|
||||||
* - Suboptimal diffusion matrix replaced by cir(1, 1, 4, 1, 8, 5, 2,
|
* - Suboptimal diffusion matrix replaced by cir(1, 1, 4, 1, 8, 5, 2,
|
||||||
* 9).
|
* 9).
|
||||||
* <p>
|
* <p/>
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
* =========
|
* =========
|
||||||
* <p>
|
* <p/>
|
||||||
* Differences from version 2.0:
|
* Differences from version 2.0:
|
||||||
* <p>
|
* <p/>
|
||||||
* - Generation of ISO/IEC 10118-3 test vectors. - Bug fix: nonzero
|
* - Generation of ISO/IEC 10118-3 test vectors. - Bug fix: nonzero
|
||||||
* carry was ignored when tallying the data length (this bug apparently
|
* carry was ignored when tallying the data length (this bug apparently
|
||||||
* only manifested itself when feeding data in pieces rather than in a
|
* only manifested itself when feeding data in pieces rather than in a
|
||||||
* single chunk at once).
|
* single chunk at once).
|
||||||
* <p>
|
* <p/>
|
||||||
* Differences from version 1.0:
|
* Differences from version 1.0:
|
||||||
* <p>
|
* <p/>
|
||||||
* - Original S-box replaced by the tweaked, hardware-efficient
|
* - Original S-box replaced by the tweaked, hardware-efficient
|
||||||
* version.
|
* version.
|
||||||
* <p>
|
* <p/>
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
* =========
|
* =========
|
||||||
* <p>
|
* <p/>
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
|
||||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
@ -115,7 +115,7 @@ public class PBKDF2Engine implements PBKDF2 {
|
|||||||
* ISO-8559-1 encoding. Output result as
|
* ISO-8559-1 encoding. Output result as
|
||||||
* "Salt:iteration-count:PBKDF2" with binary data in hexadecimal
|
* "Salt:iteration-count:PBKDF2" with binary data in hexadecimal
|
||||||
* encoding.
|
* encoding.
|
||||||
* <p>
|
* <p/>
|
||||||
* Example: Password "password" (without the quotes) leads to
|
* Example: Password "password" (without the quotes) leads to
|
||||||
* 48290A0B96C426C3:1000:973899B1D4AFEB3ED371060D0797E0EE0142BD04
|
* 48290A0B96C426C3:1000:973899B1D4AFEB3ED371060D0797E0EE0142BD04
|
||||||
*
|
*
|
||||||
|
@ -685,7 +685,7 @@ public final class Settings extends YamlConfiguration {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves current configuration (plus defaults) to disk.
|
* Saves current configuration (plus defaults) to disk.
|
||||||
* <p>
|
* <p/>
|
||||||
* If defaults and configuration are empty, saves blank file.
|
* If defaults and configuration are empty, saves blank file.
|
||||||
*
|
*
|
||||||
* @return True if saved successfully
|
* @return True if saved successfully
|
||||||
|
@ -154,7 +154,7 @@ public final class Utils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: This method requires better explanation.
|
* TODO: This method requires better explanation.
|
||||||
* <p>
|
* <p/>
|
||||||
* Set the normal group of a player.
|
* Set the normal group of a player.
|
||||||
*
|
*
|
||||||
* @param player The player.
|
* @param player The player.
|
||||||
|
Loading…
Reference in New Issue
Block a user