Replacing single columns with hash (sha256) values
-
Is it possible to jointly generate an SHA256 hash for each and every value in a single column, using Lint ? (i.e. not for the whole file one hash, but one hash per ‘excel box’). Purpose: For privacy reasons the original values are not to be presented , but a unique pseudonym is needed.
-
@Chrissiju
Your best bet is probably just using a scripting language IMO.In principle you could use PythonScript, but I would probably just use a pure Python script (without getting Notepad++ involved). You’d likely benefit from using pandas and hashlib, but seeing how this is not a general-purpose programming blog, I’m not going to go into detail about how to do so. I imagine that the final script could be written in 15 or fewer lines of highly readable code.
-
@Chrissiju said in Replacing single columns with hash (sha256) values:
Is it possible to jointly generate an SHA256 hash for each and every value in a single column, using Lint ? (i.e. not for the whole file one hash, but one hash per ‘excel box’). Purpose: For privacy reasons the original values are not to be presented , but a unique pseudonym is needed.
It is possible that I don’t understand your problem. Please forgive me if I’ve missed the point. Can you do this?:
First, make a rectangular selection enclosing the column. (Click at the top left of the column, then Alt+Shift+click at the bottom right of the column. If you have to scroll to get to the bottom, use the scrollbar, not keyboard navigation.)
Now, copy to the clipboard.
Next, select Tools | SHA-256 | Generate… from the main menu.
Check Treat each line as a separate string and paste what you copied into the top box in the dialog.
Click the Copy to Clipboard button.
Now, open a new (empty) tab and paste the contents of the clipboard.
Make a rectangular selection around that and copy. Switch back to the original document and paste.
(Despite my advice elsewhere, in this case you can paste directly into the rectangular selection if you made it top to bottom. If you made it bottom to top, the lines will be reversed… so don’t do that…)