Package org.eclipse.hono.auth
Class BCryptHelper
- java.lang.Object
-
- org.eclipse.hono.auth.BCryptHelper
-
public final class BCryptHelper extends Object
Utility methods for using BCrypt.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getIterations(String bcryptedPassword)
Gets the number of iterations used in a BCrypt hash.
-
-
-
Method Detail
-
getIterations
public static int getIterations(String bcryptedPassword)
Gets the number of iterations used in a BCrypt hash.- Parameters:
bcryptedPassword
- The hash to extract the iterations from.- Returns:
- The number of iterations.
- Throws:
IllegalArgumentException
- if the hash is not a valid BCrypt hash or uses another version than 2a.
-
-