Community
    • Login

    Replacing single columns with hash (sha256) values

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 997 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Chrissiju
      last edited by

      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.

      Mark OlsonM CoisesC 2 Replies Last reply Reply Quote 0
      • Mark OlsonM
        Mark Olson @Chrissiju
        last edited by

        @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.

        1 Reply Last reply Reply Quote 1
        • CoisesC
          Coises @Chrissiju
          last edited by Coises

          @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…)

          1 Reply Last reply Reply Quote 3
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors