<commit_before>/*
 * Copyright (c) <NAME> <<EMAIL>>
 */
'use strict';

const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const convert_source_map = require('convert-source-map');
const ora = require('ora');
const logger = require('@studio/log');
const log_format = require('@studio/log/format/fancy');
const config = require('./config');
const config_builder = require('./config-builder');
const gzip = require('./gzip');
const loadReport = require('./load-report');
const readStream = require('./read-stream');
const renderReport = require('./render-report');
const upload = require('./upload');

const ENC_ALGORITHM = 'aes-256-ctr';

function enableLogger() {
  logger.transform(log_format({ ts: false, ns: false })).out(process.stdout);
}

class Studio {

  constructor(argv) {
    if (argv.debug) {
      enableLogger();
    }
    this.argv = argv;
    this.spinner = ora('');
    this.working_dir = argv.file ? path.dirname(argv.file) : process.cwd();
    this.config = null;
    this.secret = null;
    this.upload_json = null;
    this.source = null;
    this.source_map = null;
    this.gzip_buffer = null;
  }
<commit_msg>Change crypto algorithm to "aes-128-ctr"<commit_after>/*
 * Copyright (c) <NAME> <<EMAIL>>
 */
'use strict';

const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const convert_source_map = require('convert-source-map');
const ora = require('ora');
const logger = require('@studio/log');
const log_format = require('@studio/log/format/fancy');
const config = require('./config');
const config_builder = require('./config-builder');
const gzip = require('./gzip');
const loadReport = require('./load-report');
const readStream = require('./read-stream');
const renderReport = require('./render-report');
const upload = require('./upload');

const ENC_ALGORITHM = 'aes-128-ctr';

function enableLogger() {
  logger.transform(log_format({ ts: false, ns: false })).out(process.stdout);
}

class Studio {

  constructor(argv) {
    if (argv.debug) {
      enableLogger();
    }
    this.argv = argv;
    this.spinner = ora('');
    this.working_dir = argv.file ? path.dirname(argv.file) : process.cwd();
    this.config = null;
    this.secret = null;
    this.upload_json = null;
    this.source = null;
    this.source_map = null;
    this.gzip_buffer = null;
  }

{'fraction_non_alphanumeric': 0.17728999577880963, 'fraction_numerical': 0.003799071338117349, 'mean_word_length': 4.096774193548387, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2168918', 'n_tokens_mistral': 756, 'n_tokens_neox': 747, 'n_words': 176}