Package org.pentaho.di.core.encryption
Class Encr
- java.lang.Object
-
- org.pentaho.di.core.encryption.Encr
-
public class Encr extends Object
This class handles basic encryption of passwords in Kettle. Note that it's not really encryption, it's more obfuscation. Passwords are difficult to read, not impossible.- Since:
- 17-12-2003
- Author:
- Matt
-
-
Field Summary
Fields Modifier and Type Field Description static StringPASSWORD_ENCRYPTED_PREFIXThe word that is put before a password to indicate an encrypted form.
-
Constructor Summary
Constructors Constructor Description Encr()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleancheckSignatureShort(String signature, String verify)Deprecated.static StringdecryptPassword(String encrypted)static StringdecryptPasswordOptionallyEncrypted(String password)Decrypts a password if it contains the prefix "Encrypted "static StringencryptPassword(String password)static StringencryptPasswordIfNotUsingVariables(String password)Encrypt the password, but only if the password doesn't contain any variables.static StringgetSignatureShort(String signature)Deprecated.booleaninit()Deprecated.static voidinit(String encoderPluginId)static voidmain(String[] args)Create an encrypted password
-
-
-
Field Detail
-
PASSWORD_ENCRYPTED_PREFIX
public static final String PASSWORD_ENCRYPTED_PREFIX
The word that is put before a password to indicate an encrypted form. If this word is not present, the password is considered to be NOT encrypted- See Also:
- Constant Field Values
-
-
Method Detail
-
init
@Deprecated public boolean init()
Deprecated.
-
init
public static void init(String encoderPluginId) throws KettleException
- Throws:
KettleException
-
checkSignatureShort
@Deprecated public static final boolean checkSignatureShort(String signature, String verify)
Deprecated.Old signature code, used in license keys, from the Kettle 1.x days.- Parameters:
signature-verify-- Returns:
-
getSignatureShort
@Deprecated public static final String getSignatureShort(String signature)
Deprecated.Old Kettle 1.x code used to get a short signature from a long version signature for license checking.- Parameters:
signature-- Returns:
-
encryptPasswordIfNotUsingVariables
public static final String encryptPasswordIfNotUsingVariables(String password)
Encrypt the password, but only if the password doesn't contain any variables.- Parameters:
password- The password to encrypt- Returns:
- The encrypted password or the
-
decryptPasswordOptionallyEncrypted
public static final String decryptPasswordOptionallyEncrypted(String password)
Decrypts a password if it contains the prefix "Encrypted "- Parameters:
password- The encrypted password- Returns:
- The decrypted password or the original value if the password doesn't start with "Encrypted "
-
main
public static void main(String[] args) throws KettleException
Create an encrypted password- Parameters:
args- the password to encrypt- Throws:
KettleException
-
-