class Utils {

  public static String resolvePassword( IVariables variables, String password ) {
    String resolvedPassword = variables.environmentSubstitute( password );
    if ( resolvedPassword != null ) {
      // returns resolved decrypted password
      return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword );
    } else {
      // actually null
      return resolvedPassword;
    }
  }

}