1

I'm trying to encrypt one column of my very big CSV file.

So I'm using JavaScript as the expression on the "Find and Replace" dialog of EmEditor: https://www.emeditor.org/en/howto_search_replacement_expression_syntax.html

I've correctly identified the regex for selecting the column in each line. Now I've typed the following syntax in the "Replace with" field:

\J CryptoJS.AES.encrypt( "\0" , "MySecretPassphrase")

But an error appears saying CrytoJS is undefined.

How can I call external JavaScript libraries from the "Replace with" field?

If it's not possible, is there any other way to achieve this from EmEditor? (even if I need to use a syntax different than JavaScript)

Kind Regards

J. Mag
  • 11
  • 1

1 Answers1

0

You can't import third party JS libraries into EmEditor. What I would suggest doing is copying just that column to another file. Then use NodeJS to encrypt each line. Copy the column back into your original file.

MakotoE
  • 1,814
  • 1
  • 20
  • 39