Reformatted code with new code style

This commit is contained in:
Tim Visée 2015-11-23 21:46:34 +01:00
parent b2db25d16c
commit 36c50c4507
92 changed files with 2458 additions and 2080 deletions

View File

@ -941,6 +941,7 @@ public class AuthMe extends JavaPlugin {
* @param cmd The command (Bukkit).
* @param commandLabel The command label (Bukkit).
* @param args The command arguments (Bukkit).
*
* @return True if the command was executed, false otherwise.
*/
@Override

View File

@ -18,6 +18,7 @@ public class ConsoleFilter implements Filter {
* Method isLoggable.
*
* @param record LogRecord
*
* @return boolean * @see java.util.logging.Filter#isLoggable(LogRecord)
*/
@Override

View File

@ -36,6 +36,7 @@ public class DataManager {
* Method getOfflinePlayer.
*
* @param name String
*
* @return OfflinePlayer
*/
public synchronized OfflinePlayer getOfflinePlayer(final String name) {
@ -226,6 +227,7 @@ public class DataManager {
*
* @param player Player
* @param name String
*
* @return boolean
*/
public boolean isOnline(Player player, final String name) {
@ -256,6 +258,7 @@ public class DataManager {
* Method getOnlinePlayerLower.
*
* @param name String
*
* @return Player
*/
public Player getOnlinePlayerLower(String name) {

View File

@ -34,6 +34,7 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter {
* data.
*
* @param message the Message object to verify
*
* @return the Result value
*/
private static Result validateMessage(Message message) {
@ -48,6 +49,7 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter {
* depending on whether the message contains sensitive AuthMe data.
*
* @param message the message to verify
*
* @return the Result value
*/
private static Result validateMessage(String message) {

View File

@ -128,6 +128,7 @@ public class PerformBackup {
* Method FileBackup.
*
* @param backend String
*
* @return boolean
*/
private boolean FileBackup(String backend) {
@ -150,6 +151,7 @@ public class PerformBackup {
* Method checkWindows.
*
* @param windowsPath String
*
* @return boolean
*/
private boolean checkWindows(String windowsPath) {
@ -174,6 +176,7 @@ public class PerformBackup {
*
* @param src File
* @param dst File
*
* @throws IOException
*/
void copy(File src, File dst) throws IOException {

View File

@ -50,6 +50,7 @@ public class API {
/**
* @param player
*
* @return true if player is authenticate
*/
@Deprecated
@ -59,6 +60,7 @@ public class API {
/**
* @param player
*
* @return true if the player is unrestricted
*/
@Deprecated
@ -70,6 +72,7 @@ public class API {
* Method getLastLocation.
*
* @param player Player
*
* @return Location
*/
@Deprecated
@ -108,6 +111,7 @@ public class API {
/**
* @param playerName
*
* @return true if player is registered
*/
@Deprecated
@ -119,6 +123,7 @@ public class API {
/**
* @param playerName String
* @param passwordToCheck String
*
* @return true if the password is correct , false else
*/
@Deprecated
@ -140,6 +145,7 @@ public class API {
*
* @param playerName String
* @param password String
*
* @return true if the player is register correctly
*/
@Deprecated
@ -182,6 +188,7 @@ public class API {
/**
* @param player
*
* @return true if player is a npc
*/
@Deprecated
@ -191,6 +198,7 @@ public class API {
/**
* @param player
*
* @return true if player is a npc
*/
@Deprecated

View File

@ -67,6 +67,7 @@ public class NewAPI {
/**
* @param player
*
* @return true if player is authenticate
*/
public boolean isAuthenticated(Player player) {
@ -75,6 +76,7 @@ public class NewAPI {
/**
* @param player
*
* @return true if player is a npc
*/
public boolean isNPC(Player player) {
@ -83,6 +85,7 @@ public class NewAPI {
/**
* @param player
*
* @return true if the player is unrestricted
*/
public boolean isUnrestricted(Player player) {
@ -93,6 +96,7 @@ public class NewAPI {
* Method getLastLocation.
*
* @param player Player
*
* @return Location
*/
public Location getLastLocation(Player player) {
@ -112,6 +116,7 @@ public class NewAPI {
/**
* @param playerName
*
* @return true if player is registered
*/
public boolean isRegistered(String playerName) {
@ -122,6 +127,7 @@ public class NewAPI {
/**
* @param playerName String
* @param passwordToCheck String
*
* @return true if the password is correct , false else
*/
public boolean checkPassword(String playerName, String passwordToCheck) {
@ -141,6 +147,7 @@ public class NewAPI {
*
* @param playerName String
* @param password String
*
* @return true if the player is register correctly
*/
public boolean registerPlayer(String playerName, String password) {

View File

@ -405,6 +405,7 @@ public class PlayerAuth {
* Method equals.
*
* @param obj Object
*
* @return boolean
*/
@Override

View File

@ -57,6 +57,7 @@ public class PlayerCache {
* Method isAuthenticated.
*
* @param user String
*
* @return boolean
*/
public boolean isAuthenticated(String user) {
@ -67,6 +68,7 @@ public class PlayerCache {
* Method getAuth.
*
* @param user String
*
* @return PlayerAuth
*/
public PlayerAuth getAuth(String user) {

View File

@ -70,6 +70,7 @@ public class JsonCache {
* Method readCache.
*
* @param player Player
*
* @return DataFileCache
*/
public DataFileCache readCache(Player player) {
@ -119,6 +120,7 @@ public class JsonCache {
* Method doesCacheExist.
*
* @param player Player
*
* @return boolean
*/
public boolean doesCacheExist(Player player) {
@ -141,6 +143,7 @@ public class JsonCache {
* @param jsonElement JsonElement
* @param type Type
* @param jsonDeserializationContext JsonDeserializationContext
*
* @return DataFileCache * @throws JsonParseException * @see com.google.gson.JsonDeserializer#deserialize(JsonElement, Type, JsonDeserializationContext)
*/
@Override
@ -177,6 +180,7 @@ public class JsonCache {
* @param dataFileCache DataFileCache
* @param type Type
* @param jsonSerializationContext JsonSerializationContext
*
* @return JsonElement
*/
@Override

View File

@ -124,6 +124,7 @@ public class LimboCache {
* Method getLimboPlayer.
*
* @param name String
*
* @return LimboPlayer
*/
public LimboPlayer getLimboPlayer(String name) {
@ -134,6 +135,7 @@ public class LimboCache {
* Method hasLimboPlayer.
*
* @param name String
*
* @return boolean
*/
public boolean hasLimboPlayer(String name) {

View File

@ -117,6 +117,7 @@ public class CommandDescription {
* Check whether a label is valid to use.
*
* @param label The label to test.
*
* @return True if the label is valid to use, false otherwise.
*/
public static boolean isValidLabel(String label) {
@ -140,6 +141,7 @@ public class CommandDescription {
*
* @param commandLabel The first command label.
* @param otherCommandLabel The other command label.
*
* @return True if the labels are equal to each other.
*/
private static boolean commandLabelEquals(String commandLabel, String otherCommandLabel) {
@ -178,6 +180,7 @@ public class CommandDescription {
* Get the label most similar to the reference. The first label will be returned if no reference was supplied.
*
* @param reference The command reference.
*
* @return The most similar label, or the first label. An empty label will be returned if no label was set.
*/
public String getLabel(CommandParts reference) {
@ -236,6 +239,7 @@ public class CommandDescription {
* @param commandLabel Command label to set.
* @param overwrite True to replace all old command labels, false to append this command label to the currently
* existing labels.
*
* @return Trie if the command label is added, or if it was added already. False on failure.
*/
public boolean setLabel(String commandLabel, boolean overwrite) {
@ -252,6 +256,7 @@ public class CommandDescription {
* Add a command label to the list.
*
* @param commandLabel Command label to add.
*
* @return True if the label was added, or if it was added already. False on error.
*/
public boolean addLabel(String commandLabel) {
@ -271,6 +276,7 @@ public class CommandDescription {
* Add a list of command labels.
*
* @param commandLabels List of command labels to add.
*
* @return True if succeed, false on failure.
*/
public boolean addLabels(List<String> commandLabels) {
@ -285,6 +291,7 @@ public class CommandDescription {
* Check whether this command description has a specific command.
*
* @param commandLabel Command to check for.
*
* @return True if this command label equals to the param command.
*/
public boolean hasLabel(String commandLabel) {
@ -301,6 +308,7 @@ public class CommandDescription {
* Check whether this command description has a list of labels
*
* @param commandLabels List of labels
*
* @return True if all labels match, false otherwise
*/
public boolean hasLabels(List<String> commandLabels) {
@ -318,6 +326,7 @@ public class CommandDescription {
* are suitable too.
*
* @param commandReference The command reference.
*
* @return True if the command reference is suitable to this command label, false otherwise.
*/
public boolean isSuitableLabel(CommandParts commandReference) {
@ -345,6 +354,7 @@ public class CommandDescription {
* Get the absolute command label.
*
* @param includeSlash boolean
*
* @return Absolute command label.
*/
public String getAbsoluteLabel(boolean includeSlash) {
@ -356,6 +366,7 @@ public class CommandDescription {
*
* @param includeSlash boolean
* @param reference CommandParts
*
* @return Absolute command label.
*/
public String getAbsoluteLabel(boolean includeSlash, CommandParts reference) {
@ -372,6 +383,7 @@ public class CommandDescription {
* Get the command reference.
*
* @param reference The reference to use as template, which is used to choose the most similar reference.
*
* @return Command reference.
*/
public CommandParts getCommandReference(CommandParts reference) {
@ -393,6 +405,7 @@ public class CommandDescription {
* Get the difference between this command and another command reference.
*
* @param other The other command reference.
*
* @return The command difference. Zero if there's no difference. A negative number on error.
*/
public double getCommandDifference(CommandParts other) {
@ -404,6 +417,7 @@ public class CommandDescription {
*
* @param other The other command reference.
* @param fullCompare True to fully compare both command references.
*
* @return The command difference. Zero if there's no difference. A negative number on error.
*/
public double getCommandDifference(CommandParts other, boolean fullCompare) {
@ -451,6 +465,7 @@ public class CommandDescription {
* @param sender The command sender that triggered the execution of this command.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True on success, false on failure.
*/
public boolean execute(CommandSender sender, CommandParts commandReference, CommandParts commandArguments) {
@ -489,6 +504,7 @@ public class CommandDescription {
* Set the parent command.
*
* @param parent Parent command.
*
* @return True on success, false on failure.
*/
public boolean setParent(CommandDescription parent) {
@ -543,6 +559,7 @@ public class CommandDescription {
* Add a child to the command description.
*
* @param commandDescription The child to add.
*
* @return True on success, false on failure.
*/
public boolean addChild(CommandDescription commandDescription) {
@ -577,6 +594,7 @@ public class CommandDescription {
* Check if this command description has a specific child.
*
* @param commandDescription The command description to check for.
*
* @return True if this command description has the specific child, false otherwise.
*/
public boolean isChild(CommandDescription commandDescription) {
@ -594,6 +612,7 @@ public class CommandDescription {
* Add an argument.
*
* @param argument The argument to add.
*
* @return True if succeed, false if failed.
*/
public boolean addArgument(CommandArgumentDescription argument) {
@ -636,6 +655,7 @@ public class CommandDescription {
* Check whether an argument exists.
*
* @param argument The argument to check for.
*
* @return True if this argument already exists, false otherwise.
*/
public boolean hasArgument(CommandArgumentDescription argument) {
@ -771,6 +791,7 @@ public class CommandDescription {
* Find the best suitable command for a query reference.
*
* @param queryReference The query reference to find a command for.
*
* @return The command found, or null.
*/
public FoundCommandResult findCommand(final CommandParts queryReference) {
@ -832,6 +853,7 @@ public class CommandDescription {
* Check whether there's any command description that matches the specified command reference.
*
* @param commandReference The command reference.
*
* @return True if so, false otherwise.
*/
public boolean hasSuitableCommand(CommandParts commandReference) {
@ -842,6 +864,7 @@ public class CommandDescription {
* Check if the remaining command reference elements are suitable with arguments of the current command description.
*
* @param commandReference The command reference.
*
* @return True if the arguments are suitable, false otherwise.
*/
public boolean hasSuitableArguments(CommandParts commandReference) {
@ -853,6 +876,7 @@ public class CommandDescription {
* and get the difference in argument count.
*
* @param commandReference The command reference.
*
* @return The difference in argument count between the reference and the actual command.
*/
public int getSuitableArgumentsDifference(CommandParts commandReference) {

View File

@ -89,6 +89,7 @@ public class CommandHandler {
* @param bukkitCommand The command (Bukkit).
* @param bukkitCommandLabel The command label (Bukkit).
* @param bukkitArgs The command arguments (Bukkit).
*
* @return True if the command was executed, false otherwise.
*/
public boolean onCommand(CommandSender sender, org.bukkit.command.Command bukkitCommand, String bukkitCommandLabel, String[] bukkitArgs) {
@ -181,6 +182,7 @@ public class CommandHandler {
* Process the command arguments, and return them as an array list.
*
* @param args The command arguments to process.
*
* @return The processed command arguments.
*/
private List<String> processArguments(String[] args) {

View File

@ -575,6 +575,7 @@ public class CommandManager {
* Find the best suitable command for the specified reference.
*
* @param queryReference The query reference to find a command for.
*
* @return The command found, or null.
*/
public FoundCommandResult findCommand(CommandParts queryReference) {

View File

@ -71,6 +71,7 @@ public class CommandParts {
* Add a part.
*
* @param part The part to add.
*
* @return The result.
*/
public boolean add(String part) {
@ -81,6 +82,7 @@ public class CommandParts {
* Add some parts.
*
* @param parts The parts to add.
*
* @return The result.
*/
public boolean add(List<String> parts) {
@ -91,6 +93,7 @@ public class CommandParts {
* Add some parts.
*
* @param parts The parts to add.
*
* @return The result.
*/
public boolean add(String[] parts) {
@ -112,6 +115,7 @@ public class CommandParts {
* Get a part by it's index.
*
* @param i Part index.
*
* @return The part.
*/
public String get(int i) {
@ -127,6 +131,7 @@ public class CommandParts {
* Get a range of the parts starting at the specified index up to the end of the range.
*
* @param start The starting index.
*
* @return The parts range. Arguments that were out of bound are not included.
*/
public List<String> getRange(int start) {
@ -138,6 +143,7 @@ public class CommandParts {
*
* @param start The starting index.
* @param count The number of parts to get.
*
* @return The parts range. Parts that were out of bound are not included.
*/
public List<String> getRange(int start, int count) {
@ -160,6 +166,7 @@ public class CommandParts {
* Get the difference value between two references. This won't do a full compare, just the last reference parts instead.
*
* @param other The other reference.
*
* @return The result from zero to above. A negative number will be returned on error.
*/
public double getDifference(CommandParts other) {
@ -171,6 +178,7 @@ public class CommandParts {
*
* @param other The other reference.
* @param fullCompare True to compare the full references as far as the range reaches.
*
* @return The result from zero to above. A negative number will be returned on error.
*/
public double getDifference(CommandParts other, boolean fullCompare) {

View File

@ -55,6 +55,7 @@ public class CommandPermissions {
* Add a permission node required to execute this command.
*
* @param permissionNode The permission node to add.
*
* @return True on success, false on failure.
*/
public boolean addPermissionNode(String permissionNode) {
@ -77,6 +78,7 @@ public class CommandPermissions {
* Check whether this command requires a specified permission node to execute.
*
* @param permissionNode The permission node to check for.
*
* @return True if this permission node is required, false if not.
*/
public boolean hasPermissionNode(String permissionNode) {
@ -114,6 +116,7 @@ public class CommandPermissions {
* Check whether this command requires any permission to be executed. This is based on the getPermission() method.
*
* @param sender CommandSender
*
* @return True if this command requires any permission to be executed by a player.
*/
public boolean hasPermission(CommandSender sender) {
@ -165,6 +168,7 @@ public class CommandPermissions {
* Get the default permission for a specified command sender.
*
* @param sender The command sender to get the default permission for.
*
* @return True if the command sender has permission by default, false otherwise.
*/
public boolean getDefaultPermissionCommandSender(CommandSender sender) {

View File

@ -13,6 +13,7 @@ public abstract class ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
public abstract boolean executeCommand(CommandSender sender, CommandParts commandReference, CommandParts commandArguments);

View File

@ -88,6 +88,7 @@ public class FoundCommandResult {
* Execute the command.
*
* @param sender The command sender that executed the command.
*
* @return True on success, false on failure.
*/
public boolean executeCommand(CommandSender sender) {
@ -103,6 +104,7 @@ public class FoundCommandResult {
* Check whether a command sender has permission to execute the command.
*
* @param sender The command sender.
*
* @return True if the command sender has permission, false otherwise.
*/
public boolean hasPermission(CommandSender sender) {

View File

@ -17,6 +17,7 @@ public class GetEmailCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -20,6 +20,7 @@ public class PurgeBannedPlayersCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -20,6 +20,7 @@ public class PurgeCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -19,6 +19,7 @@ public class PurgeLastPositionCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -23,6 +23,7 @@ public class RegisterCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -21,6 +21,7 @@ public class ReloadCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -19,6 +19,7 @@ public class ResetNameCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -19,6 +19,7 @@ public class SetEmailCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -17,6 +17,7 @@ public class SetFirstSpawnCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -17,6 +17,7 @@ public class SetSpawnCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -17,6 +17,7 @@ public class SpawnCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -17,6 +17,7 @@ public class SwitchAntiBotCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -29,6 +29,7 @@ public class UnregisterCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -18,6 +18,7 @@ public class VersionCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override
@ -70,6 +71,7 @@ public class VersionCommand extends ExecutableCommand {
* Check whether a player is online.
*
* @param minecraftName The Minecraft player name.
*
* @return True if the player is online, false otherwise.
*/
private boolean isPlayerOnline(String minecraftName) {

View File

@ -20,6 +20,7 @@ public class CaptchaCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -18,6 +18,7 @@ public class ConverterCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override
@ -104,6 +105,7 @@ public class ConverterCommand extends ExecutableCommand {
* Method fromName.
*
* @param name String
*
* @return ConvertType
*/
public static ConvertType fromName(String name) {

View File

@ -18,6 +18,7 @@ public class UnregisterCommand extends ExecutableCommand {
* @param sender The command sender.
* @param commandReference The command reference.
* @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise.
*/
@Override

View File

@ -23,6 +23,7 @@ public final class HelpSyntaxHelper {
* @param commandReference The reference of the command.
* @param alternativeLabel The alternative label to use for this command syntax.
* @param highlight True to highlight the important parts of this command.
*
* @return The command with proper syntax.
*/
public static String getCommandSyntax(CommandDescription commandDescription, CommandParts commandReference,

View File

@ -179,6 +179,7 @@ public class FlatToSqlite implements Converter {
* Method saveAuth.
*
* @param s String
*
* @return boolean
*/
private synchronized boolean saveAuth(String s) {

View File

@ -73,6 +73,7 @@ public class vAuthFileReader {
* Method isUUIDinstance.
*
* @param s String
*
* @return boolean
*/
private boolean isUUIDinstance(String s) {
@ -85,6 +86,7 @@ public class vAuthFileReader {
* Method getName.
*
* @param uuid UUID
*
* @return String
*/
private String getName(UUID uuid) {

View File

@ -75,6 +75,7 @@ public class xAuthToFlat {
* Method getIdPlayer.
*
* @param id int
*
* @return String
*/
public String getIdPlayer(int id) {
@ -129,6 +130,7 @@ public class xAuthToFlat {
* Method getPassword.
*
* @param accountId int
*
* @return String
*/
public String getPassword(int accountId) {

File diff suppressed because it is too large Load Diff

View File

@ -1,210 +1,226 @@
package fr.xephi.authme.datasource;
import fr.xephi.authme.cache.auth.PlayerAuth;
import java.util.List;
/**
*/
public interface DataSource {
/**
* Method isAuthAvailable.
*
* @param user String
* @return boolean
*/
boolean isAuthAvailable(String user);
/**
* Method getAuth.
*
* @param user String
* @return PlayerAuth
*/
PlayerAuth getAuth(String user);
/**
* Method saveAuth.
*
* @param auth PlayerAuth
* @return boolean
*/
boolean saveAuth(PlayerAuth auth);
/**
* Method updateSession.
*
* @param auth PlayerAuth
* @return boolean
*/
boolean updateSession(PlayerAuth auth);
/**
* Method updatePassword.
*
* @param auth PlayerAuth
* @return boolean
*/
boolean updatePassword(PlayerAuth auth);
/**
* Method purgeDatabase.
*
* @param until long
* @return int
*/
int purgeDatabase(long until);
/**
* Method autoPurgeDatabase.
*
* @param until long
* @return List<String>
*/
List<String> autoPurgeDatabase(long until);
/**
* Method removeAuth.
*
* @param user String
* @return boolean
*/
boolean removeAuth(String user);
/**
* Method updateQuitLoc.
*
* @param auth PlayerAuth
* @return boolean
*/
boolean updateQuitLoc(PlayerAuth auth);
/**
* Method getIps.
*
* @param ip String
* @return int
*/
int getIps(String ip);
/**
* Method getAllAuthsByName.
*
* @param auth PlayerAuth
* @return List<String>
*/
List<String> getAllAuthsByName(PlayerAuth auth);
/**
* Method getAllAuthsByIp.
*
* @param ip String
* @return List<String> * @throws Exception
*/
List<String> getAllAuthsByIp(String ip) throws Exception;
/**
* Method getAllAuthsByEmail.
*
* @param email String
* @return List<String> * @throws Exception
*/
List<String> getAllAuthsByEmail(String email) throws Exception;
/**
* Method updateEmail.
*
* @param auth PlayerAuth
* @return boolean
*/
boolean updateEmail(PlayerAuth auth);
/**
* Method updateSalt.
*
* @param auth PlayerAuth
* @return boolean
*/
boolean updateSalt(PlayerAuth auth);
void close();
void reload();
/**
* Method purgeBanned.
*
* @param banned List<String>
*/
void purgeBanned(List<String> banned);
/**
* Method getType.
*
* @return DataSourceType
*/
DataSourceType getType();
/**
* Method isLogged.
*
* @param user String
* @return boolean
*/
boolean isLogged(String user);
/**
* Method setLogged.
*
* @param user String
*/
void setLogged(String user);
/**
* Method setUnlogged.
*
* @param user String
*/
void setUnlogged(String user);
void purgeLogged();
/**
* Method getAccountsRegistered.
*
* @return int
*/
int getAccountsRegistered();
/**
* Method updateName.
*
* @param oldone String
* @param newone String
*/
void updateName(String oldone, String newone);
/**
* Method getAllAuths.
*
* @return List<PlayerAuth>
*/
List<PlayerAuth> getAllAuths();
/**
* Method getLoggedPlayers.
*
* @return List<PlayerAuth>
*/
List<PlayerAuth> getLoggedPlayers();
/**
*/
enum DataSourceType {
MYSQL,
FILE,
SQLITE
}
}
package fr.xephi.authme.datasource;
import fr.xephi.authme.cache.auth.PlayerAuth;
import java.util.List;
/**
*/
public interface DataSource {
/**
* Method isAuthAvailable.
*
* @param user String
*
* @return boolean
*/
boolean isAuthAvailable(String user);
/**
* Method getAuth.
*
* @param user String
*
* @return PlayerAuth
*/
PlayerAuth getAuth(String user);
/**
* Method saveAuth.
*
* @param auth PlayerAuth
*
* @return boolean
*/
boolean saveAuth(PlayerAuth auth);
/**
* Method updateSession.
*
* @param auth PlayerAuth
*
* @return boolean
*/
boolean updateSession(PlayerAuth auth);
/**
* Method updatePassword.
*
* @param auth PlayerAuth
*
* @return boolean
*/
boolean updatePassword(PlayerAuth auth);
/**
* Method purgeDatabase.
*
* @param until long
*
* @return int
*/
int purgeDatabase(long until);
/**
* Method autoPurgeDatabase.
*
* @param until long
*
* @return List<String>
*/
List<String> autoPurgeDatabase(long until);
/**
* Method removeAuth.
*
* @param user String
*
* @return boolean
*/
boolean removeAuth(String user);
/**
* Method updateQuitLoc.
*
* @param auth PlayerAuth
*
* @return boolean
*/
boolean updateQuitLoc(PlayerAuth auth);
/**
* Method getIps.
*
* @param ip String
*
* @return int
*/
int getIps(String ip);
/**
* Method getAllAuthsByName.
*
* @param auth PlayerAuth
*
* @return List<String>
*/
List<String> getAllAuthsByName(PlayerAuth auth);
/**
* Method getAllAuthsByIp.
*
* @param ip String
*
* @return List<String> * @throws Exception
*/
List<String> getAllAuthsByIp(String ip) throws Exception;
/**
* Method getAllAuthsByEmail.
*
* @param email String
*
* @return List<String> * @throws Exception
*/
List<String> getAllAuthsByEmail(String email) throws Exception;
/**
* Method updateEmail.
*
* @param auth PlayerAuth
*
* @return boolean
*/
boolean updateEmail(PlayerAuth auth);
/**
* Method updateSalt.
*
* @param auth PlayerAuth
*
* @return boolean
*/
boolean updateSalt(PlayerAuth auth);
void close();
void reload();
/**
* Method purgeBanned.
*
* @param banned List<String>
*/
void purgeBanned(List<String> banned);
/**
* Method getType.
*
* @return DataSourceType
*/
DataSourceType getType();
/**
* Method isLogged.
*
* @param user String
*
* @return boolean
*/
boolean isLogged(String user);
/**
* Method setLogged.
*
* @param user String
*/
void setLogged(String user);
/**
* Method setUnlogged.
*
* @param user String
*/
void setUnlogged(String user);
void purgeLogged();
/**
* Method getAccountsRegistered.
*
* @return int
*/
int getAccountsRegistered();
/**
* Method updateName.
*
* @param oldone String
* @param newone String
*/
void updateName(String oldone, String newone);
/**
* Method getAllAuths.
*
* @return List<PlayerAuth>
*/
List<PlayerAuth> getAllAuths();
/**
* Method getLoggedPlayers.
*
* @return List<PlayerAuth>
*/
List<PlayerAuth> getLoggedPlayers();
/**
*/
enum DataSourceType {
MYSQL,
FILE,
SQLITE
}
}

File diff suppressed because it is too large Load Diff

View File

@ -48,6 +48,7 @@ public class FlatFile implements DataSource {
* Method isAuthAvailable.
*
* @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String)
*/
@Override
@ -83,6 +84,7 @@ public class FlatFile implements DataSource {
* Method saveAuth.
*
* @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth)
*/
@Override
@ -112,6 +114,7 @@ public class FlatFile implements DataSource {
* Method updatePassword.
*
* @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth)
*/
@Override
@ -177,6 +180,7 @@ public class FlatFile implements DataSource {
* Method updateSession.
*
* @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth)
*/
@Override
@ -242,6 +246,7 @@ public class FlatFile implements DataSource {
* Method updateQuitLoc.
*
* @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth)
*/
@Override
@ -286,6 +291,7 @@ public class FlatFile implements DataSource {
* Method getIps.
*
* @param ip String
*
* @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String)
*/
@Override
@ -322,6 +328,7 @@ public class FlatFile implements DataSource {
* Method purgeDatabase.
*
* @param until long
*
* @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long)
*/
@Override
@ -374,6 +381,7 @@ public class FlatFile implements DataSource {
* Method autoPurgeDatabase.
*
* @param until long
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long)
*/
@Override
@ -426,6 +434,7 @@ public class FlatFile implements DataSource {
* Method removeAuth.
*
* @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String)
*/
@Override
@ -476,6 +485,7 @@ public class FlatFile implements DataSource {
* Method getAuth.
*
* @param user String
*
* @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String)
*/
@Override
@ -542,6 +552,7 @@ public class FlatFile implements DataSource {
* Method updateEmail.
*
* @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth)
*/
@Override
@ -586,6 +597,7 @@ public class FlatFile implements DataSource {
* Method updateSalt.
*
* @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth)
*/
@Override
@ -597,6 +609,7 @@ public class FlatFile implements DataSource {
* Method getAllAuthsByName.
*
* @param auth PlayerAuth
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth)
*/
@Override
@ -633,6 +646,7 @@ public class FlatFile implements DataSource {
* Method getAllAuthsByIp.
*
* @param ip String
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String)
*/
@Override
@ -669,6 +683,7 @@ public class FlatFile implements DataSource {
* Method getAllAuthsByEmail.
*
* @param email String
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String)
*/
@Override
@ -705,6 +720,7 @@ public class FlatFile implements DataSource {
* Method purgeBanned.
*
* @param banned List<String>
*
* @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>)
*/
@Override
@ -765,6 +781,7 @@ public class FlatFile implements DataSource {
* Method isLogged.
*
* @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String)
*/
@Override
@ -776,6 +793,7 @@ public class FlatFile implements DataSource {
* Method setLogged.
*
* @param user String
*
* @see fr.xephi.authme.datasource.DataSource#setLogged(String)
*/
@Override
@ -786,6 +804,7 @@ public class FlatFile implements DataSource {
* Method setUnlogged.
*
* @param user String
*
* @see fr.xephi.authme.datasource.DataSource#setUnlogged(String)
*/
@Override
@ -834,6 +853,7 @@ public class FlatFile implements DataSource {
*
* @param oldone String
* @param newone String
*
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/
@Override

View File

@ -218,6 +218,7 @@ public class MySQL implements DataSource {
* Method isAuthAvailable.
*
* @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String)
*/
@Override
@ -246,6 +247,7 @@ public class MySQL implements DataSource {
* Method getAuth.
*
* @param user String
*
* @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String)
*/
@Override
@ -305,6 +307,7 @@ public class MySQL implements DataSource {
* Method saveAuth.
*
* @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth)
*/
@Override
@ -518,6 +521,7 @@ public class MySQL implements DataSource {
* Method updatePassword.
*
* @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth)
*/
@Override
@ -569,6 +573,7 @@ public class MySQL implements DataSource {
* Method updateSession.
*
* @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth)
*/
@Override
@ -598,6 +603,7 @@ public class MySQL implements DataSource {
* Method purgeDatabase.
*
* @param until long
*
* @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long)
*/
@Override
@ -623,6 +629,7 @@ public class MySQL implements DataSource {
* Method autoPurgeDatabase.
*
* @param until long
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long)
*/
@Override
@ -659,6 +666,7 @@ public class MySQL implements DataSource {
* Method removeAuth.
*
* @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String)
*/
@Override
@ -702,6 +710,7 @@ public class MySQL implements DataSource {
* Method updateQuitLoc.
*
* @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth)
*/
@Override
@ -732,6 +741,7 @@ public class MySQL implements DataSource {
* Method getIps.
*
* @param ip String
*
* @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String)
*/
@Override
@ -764,6 +774,7 @@ public class MySQL implements DataSource {
* Method updateEmail.
*
* @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth)
*/
@Override
@ -792,6 +803,7 @@ public class MySQL implements DataSource {
* Method updateSalt.
*
* @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth)
*/
@Override
@ -869,6 +881,7 @@ public class MySQL implements DataSource {
* Method getAllAuthsByName.
*
* @param auth PlayerAuth
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth)
*/
@Override
@ -901,6 +914,7 @@ public class MySQL implements DataSource {
* Method getAllAuthsByIp.
*
* @param ip String
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String)
*/
@Override
@ -933,6 +947,7 @@ public class MySQL implements DataSource {
* Method getAllAuthsByEmail.
*
* @param email String
*
* @return List<String> * @throws SQLException * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String)
*/
@Override
@ -961,6 +976,7 @@ public class MySQL implements DataSource {
* Method purgeBanned.
*
* @param banned List<String>
*
* @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>)
*/
@Override
@ -997,6 +1013,7 @@ public class MySQL implements DataSource {
* Method isLogged.
*
* @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String)
*/
@Override
@ -1027,6 +1044,7 @@ public class MySQL implements DataSource {
* Method setLogged.
*
* @param user String
*
* @see fr.xephi.authme.datasource.DataSource#setLogged(String)
*/
@Override
@ -1052,6 +1070,7 @@ public class MySQL implements DataSource {
* Method setUnlogged.
*
* @param user String
*
* @see fr.xephi.authme.datasource.DataSource#setUnlogged(String)
*/
@Override
@ -1132,6 +1151,7 @@ public class MySQL implements DataSource {
*
* @param oldone String
* @param newone String
*
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/
@Override

File diff suppressed because it is too large Load Diff

View File

@ -57,6 +57,7 @@ public class CustomEvent extends Event implements Cancellable {
* Method setCancelled.
*
* @param cancelled boolean
*
* @see org.bukkit.event.Cancellable#setCancelled(boolean)
*/
public void setCancelled(boolean cancelled) {

View File

@ -27,6 +27,7 @@ public class BungeeCordMessage implements PluginMessageListener {
* @param channel String
* @param player Player
* @param message byte[]
*
* @see org.bukkit.plugin.messaging.PluginMessageListener#onPluginMessageReceived(String, Player, byte[])
*/
@Override

View File

@ -57,6 +57,7 @@ public class AuthMeInventoryPacketAdapter extends PacketAdapter {
* Method onPacketSending.
*
* @param packetEvent PacketEvent
*
* @see com.comphenix.protocol.events.PacketListener#onPacketSending(PacketEvent)
*/
@Override

View File

@ -33,6 +33,7 @@ public class ModuleManager {
* Method isModuleEnabled.
*
* @param name String
*
* @return boolean
*/
public boolean isModuleEnabled(String name) {
@ -47,6 +48,7 @@ public class ModuleManager {
* Method isModuleEnabled.
*
* @param type Module.ModuleType
*
* @return boolean
*/
public boolean isModuleEnabled(Module.ModuleType type) {
@ -61,6 +63,7 @@ public class ModuleManager {
* Method getModule.
*
* @param name String
*
* @return Module
*/
public Module getModule(String name) {
@ -75,6 +78,7 @@ public class ModuleManager {
* Method getModule.
*
* @param type Module.ModuleType
*
* @return Module
*/
public Module getModule(Module.ModuleType type) {

View File

@ -318,6 +318,7 @@ public class PermissionsManager {
*
* @param player The player.
* @param permsNode Permissions node.
*
* @return True if the player has permission.
*/
public boolean hasPermission(Player player, String permsNode) {
@ -330,6 +331,7 @@ public class PermissionsManager {
* @param player The player.
* @param permsNode The permission node.
* @param def Default returned if no permissions system is used.
*
* @return True if the player has permission.
*/
public boolean hasPermission(Player player, String permsNode, boolean def) {
@ -425,6 +427,7 @@ public class PermissionsManager {
* Get the permission groups of a player, if available.
*
* @param player The player.
*
* @return Permission groups, or an empty list if this feature is not supported.
*/
@SuppressWarnings({"unchecked", "rawtypes", "deprecation"})
@ -489,6 +492,7 @@ public class PermissionsManager {
* Get the primary group of a player, if available.
*
* @param player The player.
*
* @return The name of the primary permission group. Or null.
*/
@SuppressWarnings("deprecation")
@ -542,6 +546,7 @@ public class PermissionsManager {
*
* @param player The player.
* @param groupName The group name.
*
* @return True if the player is in the specified group, false otherwise.
* False is also returned if groups aren't supported by the used permissions system.
*/
@ -599,6 +604,7 @@ public class PermissionsManager {
*
* @param player The player
* @param groupName The name of the group.
*
* @return True if succeed, false otherwise.
* False is also returned if this feature isn't supported for the current permissions system.
*/
@ -660,6 +666,7 @@ public class PermissionsManager {
*
* @param player The player
* @param groupNames The name of the groups to add.
*
* @return True if succeed, false otherwise.
* False is also returned if this feature isn't supported for the current permissions system.
*/
@ -683,6 +690,7 @@ public class PermissionsManager {
*
* @param player The player
* @param groupName The name of the group.
*
* @return True if succeed, false otherwise.
* False is also returned if this feature isn't supported for the current permissions system.
*/
@ -744,6 +752,7 @@ public class PermissionsManager {
*
* @param player The player
* @param groupNames The name of the groups to add.
*
* @return True if succeed, false otherwise.
* False is also returned if this feature isn't supported for the current permissions system.
*/
@ -768,6 +777,7 @@ public class PermissionsManager {
*
* @param player The player
* @param groupName The name of the group.
*
* @return True if succeed, false otherwise.
* False is also returned if this feature isn't supported for the current permissions system.
*/
@ -837,6 +847,7 @@ public class PermissionsManager {
*
* @param player The player
* @param groupNames The name of the groups to set.
*
* @return True if succeed, false otherwise.
* False is also returned if this feature isn't supported for the current permissions system.
*/
@ -870,6 +881,7 @@ public class PermissionsManager {
* in it's primary group. All the subgroups are removed just fine.
*
* @param player The player to remove all groups from.
*
* @return True if succeed, false otherwise.
* False will also be returned if this feature isn't supported for the used permissions system.
*/

View File

@ -25,6 +25,7 @@ public class PasswordSecurity {
* Method createSalt.
*
* @param length int
*
* @return String * @throws NoSuchAlgorithmException
*/
public static String createSalt(int length)
@ -43,6 +44,7 @@ public class PasswordSecurity {
* @param alg HashAlgorithm
* @param password String
* @param playerName String
*
* @return String * @throws NoSuchAlgorithmException
*/
public static String getHash(HashAlgorithm alg, String password,
@ -146,6 +148,7 @@ public class PasswordSecurity {
* @param password String
* @param hash String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException
*/
public static boolean comparePasswordWithHash(String password, String hash,
@ -184,6 +187,7 @@ public class PasswordSecurity {
* @param password String
* @param hash String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException
*/
private static boolean compareWithAllEncryptionMethod(String password,

View File

@ -92,6 +92,7 @@ public class BCRYPT implements EncryptionMethod {
*
* @param d the byte array to encode
* @param len the number of bytes to encode
*
* @return base64-encoded string * @throws IllegalArgumentException if the length is invalid * @throws IllegalArgumentException
*/
private static String encode_base64(byte d[], int len)
@ -132,6 +133,7 @@ public class BCRYPT implements EncryptionMethod {
* range-checking againt conversion table
*
* @param x the base64-encoded value
*
* @return the decoded value of x
*/
private static byte char64(char x) {
@ -147,6 +149,7 @@ public class BCRYPT implements EncryptionMethod {
*
* @param s the string to decode
* @param maxolen the maximum number of bytes to decode
*
* @return an array containing the decoded bytes * @throws IllegalArgumentException if maxolen is invalid * @throws IllegalArgumentException
*/
private static byte[] decode_base64(String s, int maxolen)
@ -196,6 +199,7 @@ public class BCRYPT implements EncryptionMethod {
* @param data the string to extract the data from
* @param offp a "pointer" (as a one-entry array) to the current offset into
* data
*
* @return the next word of material from data
*/
private static int streamtoword(byte data[], int offp[]) {
@ -217,6 +221,7 @@ public class BCRYPT implements EncryptionMethod {
*
* @param password the password to hash
* @param salt the salt to hash with (perhaps generated using BCrypt.gensalt)
*
* @return the hashed password
*/
public static String hashpw(String password, String salt) {
@ -274,6 +279,7 @@ public class BCRYPT implements EncryptionMethod {
* @param log_rounds the log2 of the number of rounds of hashing to apply - the
* work factor therefore increases as 2**log_rounds.
* @param random an instance of SecureRandom to use
*
* @return an encoded salt value
*/
public static String gensalt(int log_rounds, SecureRandom random) {
@ -296,6 +302,7 @@ public class BCRYPT implements EncryptionMethod {
*
* @param log_rounds the log2 of the number of rounds of hashing to apply - the
* work factor therefore increases as 2**log_rounds.
*
* @return an encoded salt value
*/
public static String gensalt(int log_rounds) {
@ -317,6 +324,7 @@ public class BCRYPT implements EncryptionMethod {
*
* @param plaintext the plaintext password to verify
* @param hashed the previously-hashed password
*
* @return true if the passwords match, false otherwise
*/
public static boolean checkpw(String plaintext, String hashed) {
@ -330,6 +338,7 @@ public class BCRYPT implements EncryptionMethod {
* @param text plaintext or hashed text
* @param hashed the previously-hashed password
* @param rounds number of rounds to hash the password
*
* @return boolean
*/
public static boolean checkpw(String text, String hashed, int rounds) {
@ -355,6 +364,7 @@ public class BCRYPT implements EncryptionMethod {
*
* @param text String
* @param salt String
*
* @return String
*/
public static String getDoubleHash(String text, String salt) {
@ -467,6 +477,7 @@ public class BCRYPT implements EncryptionMethod {
* @param salt the binary salt to hash with the password
* @param log_rounds the binary logarithm of the number of rounds of hashing to
* apply
*
* @return an array containing the binary hashed password
*/
private byte[] crypt_raw(byte password[], byte salt[], int log_rounds) {
@ -509,6 +520,7 @@ public class BCRYPT implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -523,6 +535,7 @@ public class BCRYPT implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -12,6 +12,7 @@ public class BCRYPT2Y implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -28,6 +29,7 @@ public class BCRYPT2Y implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -32,6 +32,7 @@ public class CRAZYCRYPT1 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override

View File

@ -15,6 +15,7 @@ public class CryptPBKDF2 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -33,6 +34,7 @@ public class CryptPBKDF2 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -16,6 +16,7 @@ public class CryptPBKDF2Django implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -34,6 +35,7 @@ public class CryptPBKDF2Django implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -12,6 +12,7 @@ public class DOUBLEMD5 implements EncryptionMethod {
* Method getMD5.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getMD5(String message)
@ -29,6 +30,7 @@ public class DOUBLEMD5 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -43,6 +45,7 @@ public class DOUBLEMD5 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -24,6 +24,7 @@ public interface EncryptionMethod {
* @param salt (can be an other data like playerName;salt , playerName,
* etc... for customs methods)
* @param name String
*
* @return Hashing password * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException
*/
String getHash(String password, String salt, String name)
@ -33,6 +34,7 @@ public interface EncryptionMethod {
* @param hash
* @param password
* @param playerName
*
* @return true if password match, false else * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException
*/
boolean comparePassword(String hash, String password, String playerName)

View File

@ -14,6 +14,7 @@ public class IPB3 implements EncryptionMethod {
* Method getMD5.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getMD5(String message)
@ -31,6 +32,7 @@ public class IPB3 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -45,6 +47,7 @@ public class IPB3 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -12,6 +12,7 @@ public class JOOMLA implements EncryptionMethod {
* Method getMD5.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getMD5(String message)
@ -29,6 +30,7 @@ public class JOOMLA implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -43,6 +45,7 @@ public class JOOMLA implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -12,6 +12,7 @@ public class MD5 implements EncryptionMethod {
* Method getMD5.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getMD5(String message)
@ -29,6 +30,7 @@ public class MD5 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -43,6 +45,7 @@ public class MD5 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -12,6 +12,7 @@ public class MD5VB implements EncryptionMethod {
* Method getMD5.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getMD5(String message)
@ -29,6 +30,7 @@ public class MD5VB implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -43,6 +45,7 @@ public class MD5VB implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -14,6 +14,7 @@ public class MYBB implements EncryptionMethod {
* Method getMD5.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getMD5(String message)
@ -31,6 +32,7 @@ public class MYBB implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -45,6 +47,7 @@ public class MYBB implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -21,6 +21,7 @@ public class PHPBB implements EncryptionMethod {
* Method md5.
*
* @param data String
*
* @return String
*/
public static String md5(String data) {
@ -38,6 +39,7 @@ public class PHPBB implements EncryptionMethod {
* Method hexToInt.
*
* @param ch char
*
* @return int
*/
static int hexToInt(char ch) {
@ -53,6 +55,7 @@ public class PHPBB implements EncryptionMethod {
* Method bytes2hex.
*
* @param bytes byte[]
*
* @return String
*/
private static String bytes2hex(byte[] bytes) {
@ -70,6 +73,7 @@ public class PHPBB implements EncryptionMethod {
* Method pack.
*
* @param hex String
*
* @return String
*/
static String pack(String hex) {
@ -88,6 +92,7 @@ public class PHPBB implements EncryptionMethod {
*
* @param password String
* @param salt String
*
* @return String
*/
public String phpbb_hash(String password, String salt) {
@ -110,6 +115,7 @@ public class PHPBB implements EncryptionMethod {
*
* @param input String
* @param itoa64 String
*
* @return String
*/
private String _hash_gensalt_private(String input, String itoa64) {
@ -122,6 +128,7 @@ public class PHPBB implements EncryptionMethod {
* @param input String
* @param itoa64 String
* @param iteration_count_log2 int
*
* @return String
*/
private String _hash_gensalt_private(String input, String itoa64,
@ -140,6 +147,7 @@ public class PHPBB implements EncryptionMethod {
*
* @param input String
* @param count int
*
* @return String
*/
private String _hash_encode64(String input, int count) {
@ -168,6 +176,7 @@ public class PHPBB implements EncryptionMethod {
*
* @param password String
* @param setting String
*
* @return String
*/
String _hash_crypt_private(String password, String setting) {
@ -196,6 +205,7 @@ public class PHPBB implements EncryptionMethod {
*
* @param password String
* @param hash String
*
* @return boolean
*/
public boolean phpbb_check_hash(String password, String hash) {
@ -210,6 +220,7 @@ public class PHPBB implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -224,6 +235,7 @@ public class PHPBB implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -18,6 +18,7 @@ public class PHPFUSION implements EncryptionMethod {
* Method getSHA1.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getSHA1(String message)
@ -35,6 +36,7 @@ public class PHPFUSION implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -70,6 +72,7 @@ public class PHPFUSION implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -12,6 +12,7 @@ public class PLAINTEXT implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -26,6 +27,7 @@ public class PLAINTEXT implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -13,6 +13,7 @@ public class ROYALAUTH implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -28,6 +29,7 @@ public class ROYALAUTH implements EncryptionMethod {
*
* @param password String
* @param salt String
*
* @return String * @throws NoSuchAlgorithmException
*/
public String hash(String password, String salt)
@ -47,6 +49,7 @@ public class ROYALAUTH implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -14,6 +14,7 @@ public class SALTED2MD5 implements EncryptionMethod {
* Method getMD5.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getMD5(String message)
@ -31,6 +32,7 @@ public class SALTED2MD5 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -45,6 +47,7 @@ public class SALTED2MD5 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -14,6 +14,7 @@ public class SALTEDSHA512 implements EncryptionMethod {
* Method getSHA512.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getSHA512(String message)
@ -31,6 +32,7 @@ public class SALTEDSHA512 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -45,6 +47,7 @@ public class SALTEDSHA512 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -12,6 +12,7 @@ public class SHA1 implements EncryptionMethod {
* Method getSHA1.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getSHA1(String message)
@ -29,6 +30,7 @@ public class SHA1 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -43,6 +45,7 @@ public class SHA1 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -12,6 +12,7 @@ public class SHA256 implements EncryptionMethod {
* Method getSHA256.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getSHA256(String message)
@ -29,6 +30,7 @@ public class SHA256 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -43,6 +45,7 @@ public class SHA256 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -12,6 +12,7 @@ public class SHA512 implements EncryptionMethod {
* Method getSHA512.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getSHA512(String message)
@ -29,6 +30,7 @@ public class SHA512 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -43,6 +45,7 @@ public class SHA512 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -12,6 +12,7 @@ public class SMF implements EncryptionMethod {
* Method getSHA1.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getSHA1(String message)
@ -29,6 +30,7 @@ public class SMF implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -43,6 +45,7 @@ public class SMF implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -14,6 +14,7 @@ public class WBB3 implements EncryptionMethod {
* Method getSHA1.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getSHA1(String message)
@ -31,6 +32,7 @@ public class WBB3 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -45,6 +47,7 @@ public class WBB3 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -12,6 +12,7 @@ public class WBB4 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -26,6 +27,7 @@ public class WBB4 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -168,6 +168,7 @@ public class WHIRLPOOL implements EncryptionMethod {
* Method display.
*
* @param array byte[]
*
* @return String
*/
protected static String display(byte[] array) {
@ -395,6 +396,7 @@ public class WHIRLPOOL implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -413,6 +415,7 @@ public class WHIRLPOOL implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -18,6 +18,7 @@ public class WORDPRESS implements EncryptionMethod {
*
* @param src byte[]
* @param count int
*
* @return String
*/
private String encode64(byte[] src, int count) {
@ -59,6 +60,7 @@ public class WORDPRESS implements EncryptionMethod {
*
* @param password String
* @param setting String
*
* @return String
*/
private String crypt(String password, String setting) {
@ -103,6 +105,7 @@ public class WORDPRESS implements EncryptionMethod {
* Method gensaltPrivate.
*
* @param input byte[]
*
* @return String
*/
private String gensaltPrivate(byte[] input) {
@ -117,6 +120,7 @@ public class WORDPRESS implements EncryptionMethod {
* Method stringToUtf8.
*
* @param string String
*
* @return byte[]
*/
private byte[] stringToUtf8(String string) {
@ -133,6 +137,7 @@ public class WORDPRESS implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -149,6 +154,7 @@ public class WORDPRESS implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -10,6 +10,7 @@ public class XAUTH implements EncryptionMethod {
* Method getWhirlpool.
*
* @param message String
*
* @return String
*/
public static String getWhirlpool(String message) {
@ -27,6 +28,7 @@ public class XAUTH implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -43,6 +45,7 @@ public class XAUTH implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override

View File

@ -19,6 +19,7 @@ public class XF implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@ -33,6 +34,7 @@ public class XF implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@ -46,6 +48,7 @@ public class XF implements EncryptionMethod {
* Method getSHA256.
*
* @param password String
*
* @return String * @throws NoSuchAlgorithmException
*/
public String getSHA256(String password) throws NoSuchAlgorithmException {
@ -72,6 +75,7 @@ public class XF implements EncryptionMethod {
*
* @param pattern String
* @param line String
*
* @return String
*/
public String regmatch(String pattern, String line) {

View File

@ -38,6 +38,7 @@ public class BinTools {
* Simple binary-to-hexadecimal conversion.
*
* @param b Input bytes. May be <code>null</code>.
*
* @return Hexadecimal representation of b. Uppercase A-F, two characters
* per byte. Empty string on <code>null</code> input.
*/
@ -59,6 +60,7 @@ public class BinTools {
*
* @param s String containing hexadecimal digits. May be <code>null</code>
* . On odd length leading zero will be assumed.
*
* @return Array on bytes, non-<code>null</code>. * @throws IllegalArgumentException
* when string contains non-hex character
*/
@ -84,6 +86,7 @@ public class BinTools {
* Convert hex digit to numerical value.
*
* @param c 0-9, a-f, A-F allowd.
*
* @return 0-15 * @throws IllegalArgumentException
* on non-hex character
*/

View File

@ -83,6 +83,7 @@ public class MacBasedPRF implements PRF {
* Method doFinal.
*
* @param M byte[]
*
* @return byte[] * @see fr.xephi.authme.security.pbkdf2.PRF#doFinal(byte[])
*/
public byte[] doFinal(byte[] M) {
@ -103,6 +104,7 @@ public class MacBasedPRF implements PRF {
* Method init.
*
* @param P byte[]
*
* @see fr.xephi.authme.security.pbkdf2.PRF#init(byte[])
*/
public void init(byte[] P) {

View File

@ -38,6 +38,7 @@ public interface PBKDF2 {
* Desired key length defaults to Pseudo Random Function block size.
*
* @param inputPassword Candidate password to compute the derived key for.
*
* @return internal byte array
*/
public abstract byte[] deriveKey(String inputPassword);
@ -47,6 +48,7 @@ public interface PBKDF2 {
*
* @param inputPassword Candidate password to compute the derived key for.
* @param dkLen Specify desired key length
*
* @return internal byte array
*/
public abstract byte[] deriveKey(String inputPassword, int dkLen);
@ -57,6 +59,7 @@ public interface PBKDF2 {
* PBKDF2Parameters.
*
* @param inputPassword Candidate password to compute the derived key for.
*
* @return <code>true</code> password match; <code>false</code> incorrect
* password
*/

View File

@ -120,6 +120,7 @@ public class PBKDF2Engine implements PBKDF2 {
* 48290A0B96C426C3:1000:973899B1D4AFEB3ED371060D0797E0EE0142BD04
*
* @param args Supply the password as argument.
*
* @throws IOException * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException
*/
public static void main(String[] args)
@ -162,6 +163,7 @@ public class PBKDF2Engine implements PBKDF2 {
* Method deriveKey.
*
* @param inputPassword String
*
* @return byte[] * @see fr.xephi.authme.security.pbkdf2.PBKDF2#deriveKey(String)
*/
public byte[] deriveKey(String inputPassword) {
@ -173,6 +175,7 @@ public class PBKDF2Engine implements PBKDF2 {
*
* @param inputPassword String
* @param dkLen int
*
* @return byte[] * @see fr.xephi.authme.security.pbkdf2.PBKDF2#deriveKey(String, int)
*/
public byte[] deriveKey(String inputPassword, int dkLen) {
@ -203,6 +206,7 @@ public class PBKDF2Engine implements PBKDF2 {
* Method verifyKey.
*
* @param inputPassword String
*
* @return boolean * @see fr.xephi.authme.security.pbkdf2.PBKDF2#verifyKey(String)
*/
public boolean verifyKey(String inputPassword) {
@ -249,6 +253,7 @@ public class PBKDF2Engine implements PBKDF2 {
* Method setPseudoRandomFunction.
*
* @param prf PRF
*
* @see fr.xephi.authme.security.pbkdf2.PBKDF2#setPseudoRandomFunction(PRF)
*/
public void setPseudoRandomFunction(PRF prf) {
@ -262,6 +267,7 @@ public class PBKDF2Engine implements PBKDF2 {
* @param S Salt as array of bytes. <code>null</code> means no salt.
* @param c Iteration count (see RFC 2898 4.2)
* @param dkLen desired length of derived key.
*
* @return internal byte array * @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2</a>
*/
protected byte[] PBKDF2(PRF prf, byte[] S, int c, int dkLen) {
@ -291,6 +297,7 @@ public class PBKDF2Engine implements PBKDF2 {
*
* @param a
* @param b
*
* @return ceil(a/b) * @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step
* 2.</a>
*/
@ -311,6 +318,7 @@ public class PBKDF2Engine implements PBKDF2 {
* @param S Salt as array of bytes
* @param c Iteration count
* @param blockIndex
*
* @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step
* 3.</a>
*/
@ -350,6 +358,7 @@ public class PBKDF2Engine implements PBKDF2 {
* @param dest
* @param offset
* @param i
*
* @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step
* 3.</a>
*/
@ -373,6 +382,7 @@ public class PBKDF2Engine implements PBKDF2 {
* Method setParameters.
*
* @param parameters PBKDF2Parameters
*
* @see fr.xephi.authme.security.pbkdf2.PBKDF2#setParameters(PBKDF2Parameters)
*/
public void setParameters(PBKDF2Parameters parameters) {

View File

@ -37,6 +37,7 @@ public interface PBKDF2Formatter {
* Convert parameters to String.
*
* @param p Parameters object to output.
*
* @return String representation
*/
public abstract String toString(PBKDF2Parameters p);
@ -47,6 +48,7 @@ public interface PBKDF2Formatter {
*
* @param s String representation of parameters to decode.
* @param p PBKDF2Parameters
*
* @return <code>false</code> syntax OK, <code>true</code> some syntax
* issue.
*/

View File

@ -38,6 +38,7 @@ public class PBKDF2HexFormatter implements PBKDF2Formatter {
*
* @param p PBKDF2Parameters
* @param s String
*
* @return boolean * @see fr.xephi.authme.security.pbkdf2.PBKDF2Formatter#fromString(PBKDF2Parameters, String)
*/
public boolean fromString(PBKDF2Parameters p, String s) {
@ -64,6 +65,7 @@ public class PBKDF2HexFormatter implements PBKDF2Formatter {
* Method toString.
*
* @param p PBKDF2Parameters
*
* @return String * @see fr.xephi.authme.security.pbkdf2.PBKDF2Formatter#toString(PBKDF2Parameters)
*/
public String toString(PBKDF2Parameters p) {

View File

@ -46,6 +46,7 @@ public interface PRF {
*
* @param M Input data/message etc. Together with any data supplied during
* initilization.
*
* @return Random bytes of hLen length.
*/
public byte[] doFinal(byte[] M);

View File

@ -87,6 +87,7 @@ public class OtherAccounts extends CustomConfiguration {
* Method getAllPlayersByUUID.
*
* @param uuid UUID
*
* @return List<String>
*/
public List<String> getAllPlayersByUUID(UUID uuid) {

View File

@ -338,6 +338,7 @@ public final class Settings extends YamlConfiguration {
*
* @param name String
* @param ip String
*
* @return boolean
*/
public static boolean getRestrictedIp(String name, String ip) {
@ -377,6 +378,7 @@ public final class Settings extends YamlConfiguration {
* Method checkLang.
*
* @param lang String
*
* @return String
*/
public static String checkLang(String lang) {
@ -442,6 +444,7 @@ public final class Settings extends YamlConfiguration {
* Method isEmailCorrect.
*
* @param email String
*
* @return boolean
*/
public static boolean isEmailCorrect(String email) {

View File

@ -58,6 +58,7 @@ public class Spawn extends CustomConfiguration {
* Method setSpawn.
*
* @param location Location
*
* @return boolean
*/
public boolean setSpawn(Location location) {
@ -79,6 +80,7 @@ public class Spawn extends CustomConfiguration {
* Method setFirstSpawn.
*
* @param location Location
*
* @return boolean
*/
public boolean setFirstSpawn(Location location) {

View File

@ -71,6 +71,7 @@ public class GeoLiteAPI {
* Get the country code of the given IP address.
*
* @param ip Ip address
*
* @return String
*/
public static String getCountryCode(String ip) {
@ -84,6 +85,7 @@ public class GeoLiteAPI {
* Get the country name of the given IP address.
*
* @param ip Ip address
*
* @return String
*/
public static String getCountryName(String ip) {

View File

@ -19,6 +19,7 @@ public class StringUtils {
*
* @param first First string
* @param second Second string
*
* @return The difference value
*/
public static double getDifference(String first, String second) {
@ -38,6 +39,7 @@ public class StringUtils {
*
* @param str the string to analyze
* @param pieces the items to check the string for
*
* @return true if the string contains at least one of the items
*/
public static boolean containsAny(String str, String... pieces) {
@ -57,6 +59,7 @@ public class StringUtils {
* is trimmed, so this method also considers a string with whitespace as empty.
*
* @param str the string to verify
*
* @return true if the string is empty, false otherwise
*/
public static boolean isEmpty(String str) {
@ -68,6 +71,7 @@ public class StringUtils {
*
* @param delimiter the delimiter to use
* @param elements the elements to join
*
* @return a new String that is composed of the elements separated by the delimiter
*/
public static String join(String delimiter, Iterable<String> elements) {
@ -89,6 +93,7 @@ public class StringUtils {
* Get a full stack trace of an exception as a string.
*
* @param exception The exception.
*
* @return Stack trace as a string.
*/
public static String getStackTrace(Exception exception) {

View File

@ -100,6 +100,7 @@ public final class Utils {
*
* @param player The player.
* @param group The group type.
*
* @return True if succeed, false otherwise. False is also returned if groups aren't supported
* with the current permissions system.
*/
@ -159,6 +160,7 @@ public final class Utils {
*
* @param player The player.
* @param group The normal group.
*
* @return True on success, false on failure.
*/
public static boolean addNormal(Player player, String group) {
@ -277,6 +279,7 @@ public final class Utils {
* Bukkit#getOnlinePlayers()} directly.
*
* @return collection of online players
*
* @see <a href="https://www.spigotmc.org/threads/solved-cant-use-new-getonlineplayers.33061/">SpigotMC
* forum</a>
* @see <a href="http://stackoverflow.com/questions/32130851/player-changed-from-array-to-collection">StackOverflow</a>