public class Encr extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PASSWORD_ENCRYPTED_PREFIX
The word that is put before a password to indicate an encrypted form.
|
Constructor and Description |
---|
Encr() |
Modifier and Type | Method and Description |
---|---|
String |
buildSignature(String mac,
String username,
String company,
String products) |
static boolean |
checkSignatureShort(String signature,
String verify) |
static String |
decryptPassword(String encrypted) |
static String |
decryptPasswordOptionallyEncrypted(String password)
Decrypts a password if it contains the prefix "Encrypted "
|
static String |
encryptPassword(String password) |
static String |
encryptPasswordIfNotUsingVariables(String password)
Encrypt the password, but only if the password doesn't contain any variables.
|
static String |
getSignatureShort(String signature) |
boolean |
init() |
static void |
main(String[] args)
Create an encrypted password
|
public static final String PASSWORD_ENCRYPTED_PREFIX
public boolean init()
public String buildSignature(String mac, String username, String company, String products)
public static final boolean checkSignatureShort(String signature, String verify)
public static final String encryptPasswordIfNotUsingVariables(String password)
password
- The password to encryptpublic static final String decryptPasswordOptionallyEncrypted(String password)
password
- The encrypted passwordpublic static void main(String[] args)
args
- the password to encrypt