<commit_before>'use strict'

// crypto.js - some simple cryptography tools

const fs = require('fs')
const crypto = require('crypto')

const algorithm = 'aes-256-ctr'

// Nodejs encryption with CTR

function encrypt (text) {
  var cipher = crypto.createCipher(algorithm, process.env.CRYPTO_KEY)
  var crypted = cipher.update(text, 'utf8', 'hex')
  crypted += cipher.final('hex')
  return crypted
}

function decrypt (text) {
  var decipher = crypto.createDecipher(algorithm, process.env.CRYPTO_KEY)
  var dec = decipher.update(text, 'hex', 'utf8')
  dec += decipher.final('utf8')
  return dec
}

module.exports = {
  encrypt: encrypt,
  decrypt: decrypt
}<commit_msg>removing deprecated ref to 'fs' module<commit_after>'use strict'

// crypto.js - some simple cryptography tools

const crypto = require('crypto')
const algorithm = 'aes-256-ctr'

// Nodejs encryption with CTR

function encrypt (text) {
  var cipher = crypto.createCipher(algorithm, process.env.CRYPTO_KEY)
  var crypted = cipher.update(text, 'utf8', 'hex')
  crypted += cipher.final('hex')
  return crypted
}

function decrypt (text) {
  var decipher = crypto.createDecipher(algorithm, process.env.CRYPTO_KEY)
  var dec = decipher.update(text, 'hex', 'utf8')
  dec += decipher.final('utf8')
  return dec
}

module.exports = {
  encrypt: encrypt,
  decrypt: decrypt
}
{'fraction_non_alphanumeric': 0.1312828207051763, 'fraction_numerical': 0.00900225056264066, 'mean_word_length': 4.489711934156379, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6776268', 'n_tokens_mistral': 461, 'n_tokens_neox': 438, 'n_words': 116}