public class PasswordMaker extends Object
| Constructor and Description |
|---|
PasswordMaker() |
| Modifier and Type | Method and Description |
|---|---|
static double |
calcPasswordStrength(SecureCharArray pw)
Calculates the strength of a password.
|
SecureUTF8String |
generateVerificationCode(SecureUTF8String masterPassword) |
static String |
getDefaultCryptoProvider() |
String |
getModifiedInputText(String inputText,
Account account) |
SecureUTF8String |
makePassword(SecureUTF8String masterPassword,
Account account)
Generates a hash of the master password with settings from the account.
|
SecureUTF8String |
makePassword(SecureUTF8String masterPassword,
Account account,
String inputText)
Generates a hash of the master password with settings from the account.
|
SecureUTF8String |
makePassword(SecureUTF8String masterPassword,
Account account,
String inputText,
String username)
Generates a hash of the master password with settings from the account.
|
SecureUTF8String |
rstr2any(char[] input,
String encoding,
boolean trim)
Maps an array of characters to another character set.
|
static void |
setDefaultCryptoProvider(String provider) |
public static void setDefaultCryptoProvider(String provider)
public static String getDefaultCryptoProvider()
public static double calcPasswordStrength(SecureCharArray pw)
pw - the password to calculate the strengthpublic SecureUTF8String rstr2any(char[] input, String encoding, boolean trim) throws Exception
This is the magic which allows an encrypted password to be mapped into a a specific character set.
input - The array of characters to map.encoding - The list of characters to map to.trim - Whether to trim leading zeros ... I think.Exception - On odd length!?public SecureUTF8String makePassword(SecureUTF8String masterPassword, Account account, String inputText, String username) throws Exception
masterPassword - The password to use as a key for the various algorithms.account - The account with the specific settings for the hash.inputText - The text to use as the input into the password maker algorithmusername - The username to use for generating the passwordException - if something bad happened.public SecureUTF8String makePassword(SecureUTF8String masterPassword, Account account, String inputText) throws Exception
masterPassword - The password to use as a key for the various algorithms.account - The account with the specific settings for the hash.inputText - The text to use as the input into the password maker algorithmException - if something bad happened.public SecureUTF8String makePassword(SecureUTF8String masterPassword, Account account) throws Exception
masterPassword - The password to use as a key for the various algorithms.account - The account with the specific settings for the hash. Uses account.getUrl() as the inputTextException - if something bad happened.public SecureUTF8String generateVerificationCode(SecureUTF8String masterPassword) throws Exception
ExceptionCopyright © 2018. All rights reserved.