core/src/main/java/org/apache/hop/core/encryption/Encr.java
public static void main( String[] args ) throws HopException {
    HopClientEnvironment.init();
    if ( args.length != 2 ) {
      printOptions();
      System.exit( 9 );
    }

    String option = args[ 0 ];
    String password = args[ 1 ];

    if ( Const.trim( option ).substring( 1 ).equalsIgnoreCase( "hop" ) ) {
      // Hop password obfuscation
      //
      try {
        String obfuscated = Encr.encryptPasswordIfNotUsingVariables( password );
        System.out.println(obfuscated);
        System.exit( 0 );
      } catch ( Exception ex ) {
        System.err.println( "Error encrypting password" );
        ex.printStackTrace();
        System.exit( 2 );
      }

    } else if ( Const.trim( option ).substring( 1 ).equalsIgnoreCase( "server" ) ) {
      // Jetty password obfuscation
      //
      String obfuscated = Password.obfuscate( password );
      System.out.println(obfuscated);
      System.exit( 0 );

    } else {
      // Unknown option, print usage
      //
      System.err.println( "Unknown option '" + option + "'\n" );
      printOptions();
      System.exit( 1 );
    }

  }
/**
   * Create an encrypted password
   *
   * @param args the password to encrypt
   */
Create an encrypted password
@param args the password to encrypt
Create an encrypted password @param args the password to encrypt
public static void main( String[] args ) throws HopException {
    HopClientEnvironment.init();
    if ( args.length != 2 ) {
      printOptions();
      System.exit( 9 );
    }
    String option = args[ 0 ];
    String password = args[ 1 ];
    if ( Const.trim( option ).substring( 1 ).equalsIgnoreCase( "hop" ) ) {
      try {
        String obfuscated = Encr.encryptPasswordIfNotUsingVariables( password );
        System.out.println(obfuscated);
        System.exit( 0 );
      } catch ( Exception ex ) {
        System.err.println( "Error encrypting password" );
        ex.printStackTrace();
        System.exit( 2 );
      }
    } else if ( Const.trim( option ).substring( 1 ).equalsIgnoreCase( "server" ) ) {
       Jetty password obfuscation
      String obfuscated = Password.obfuscate( password );
      System.out.println(obfuscated);
      System.exit( 0 );
    } else {
       Unknown option, print usage
      System.err.println( "Unknown option '" + option + "'\n" );
      printOptions();
      System.exit( 1 );
    }
  }
public static void main ( String [ ] args ) throws HopException { HopClientEnvironment . init ( ) ; if ( args . length != 2 ) { printOptions ( ) ; System . exit ( 9 ) ; } String option = args [ 0 ] ; String password = args [ 1 ] ; if ( Const . trim ( option ) . substring ( 1 ) . equalsIgnoreCase ( "hop" ) ) { try { String obfuscated = Encr . encryptPasswordIfNotUsingVariables ( password ) ; System . out . println ( obfuscated ) ; System . exit ( 0 ) ; } catch ( Exception ex ) { System . err . println ( "Error encrypting password" ) ; ex . printStackTrace ( ) ; System . exit ( 2 ) ; } } else if ( Const . trim ( option ) . substring ( 1 ) . equalsIgnoreCase ( "server" ) ) { String obfuscated = Password . obfuscate ( password ) ; System . out . println ( obfuscated ) ; System . exit ( 0 ) ; } else { System . err . println ( "Unknown option '" + option + "'\n" ) ; printOptions ( ) ; System . exit ( 1 ) ; } }
Create an encrypted password
 @param args the password to encrypt
Create an encrypted password @param args the password to encrypt
// Hop password obfuscation // // Jetty password obfuscation // // Unknown option, print usage //