Community
    • Login

    Replacing single columns with hash (sha256) values

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 2.1k Views 1 Watching
    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 Offline
      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 Offline
        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 Offline
          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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors