Class 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 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
    • Constructor Detail

      • Encr

        public Encr()
    • Method Detail

      • 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:
      • encryptPassword

        public static final String encryptPassword​(String password)
      • decryptPassword

        public static final String decryptPassword​(String encrypted)
      • 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 "