• Login
Community
  • Login

Please recommend encryption plug-in

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 1.1k 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.
  • T
    Tony F
    last edited by Jul 7, 2023, 6:41 AM

    I need to encrypt some text files. I note that there is more than one plug-in to do this. I really don’t want to make the wrong choice here so:

    • Do you know which is best?
    • Or have an opinion on which is best?
    • Or just found one that works ok?
      Thanks
    P 1 Reply Last reply Jul 7, 2023, 1:20 PM Reply Quote 0
    • P
      PeterJones @Tony F
      last edited by PeterJones Jul 7, 2023, 2:48 PM Jul 7, 2023, 1:20 PM

      @Tony-F ,

      “Best” is in the eye of the beholder, depending on what features you need and what workflow you prefer.

      A few years ago, I played a little with NppCrypt, and it seemed reasonable to me. (There was a slight kerfluffle because v1.0.6 was incompatible with the earlier versions – but since you won’t be starting with an older version, and the author hasn’t made a new release since v1.0.1.6 in 2019, you shouldn’t have to worry about that for now). But since the Notepad++ plugin interface has changed somewhat over the last couple years, I cannot guarantee that NppCrypt will still work with modern Notepad++ versions.

      I see that SecurePad has been more active over the last couple years (it’s most recent release was 2022, compared to NppCrypt’s 2019) – that doesn’t mean it’s necessarily “better”, but it might improve the chances of getting bug fixes and feature requests incorporated into new releases (and it might not).

      Personally, for the rare times I’ve wanted to encrypt a file inside Notepad++ (rather than just using a right-click context action), I have a script for the NppExec plugin that runs the active file through my command-line gpg.exe:

      encrypt

      cls
      cmd.exe /c exit %RANDOM%								// cannot access $(SYS.RANDOM) directly through NppExec, but can tell cmd.exe to return it as a value
      set tempfile = $(SYS.TEMP)\NppGpgFile_$(EXITCODE).tmp					// create random tempfile name
      set ascfile = $(SYS.TEMP)\NppGpgFile_$(EXITCODE).asc					// create associated ascfile name
      sci_sendmsg SCI_SELECTALL								// select all
      sel_saveto $(tempfile) :a								// save selection to the tempfile	(use :a to save as ansi, to prevent unicode prefix ÿþ getting embedded)
      INPUTBOX "Recipients (use -r between multiple): " : XXXXX@XXXXX.XXX -r XXXX@XXXX.XXX // get the recipients
      gpg.exe --output "$(ascfile)" -ase -r $(INPUT) "$(tempfile)"					// armor+sign+encrypt to recipient(s)
      sel_loadfrom $(ascfile)								// replace selection with results
      sci_sendmsg SCI_DOCUMENTSTART							// deselect
      //rm -rf "$(tempfile)" "$(ascfile)"							// cleanup temp files
      npp_save
      

      decrypt

      cls
      cmd.exe /c exit %RANDOM%							// cannot access $(SYS.RANDOM) directly through NppExec, but can tell cmd.exe to return it as a value
      set tempfile = $(SYS.TEMP)\NppGpgFile_$(EXITCODE).tmp				// create random tempfile name
      set ascfile = $(SYS.TEMP)\NppGpgFile_$(EXITCODE).asc				// create associated ascfile name
      sci_sendmsg SCI_SELECTALL							// select all
      sel_saveto $(ascfile) :a							// save selection to the ascfile	(use :a to save as ansi, to prevent unicode prefix ÿþ getting embedded)
      gpg.exe --output "$(tempfile)" --decrypt "$(ascfile)"				// decrypt
      sel_loadfrom $(tempfile)							// replace selection with results
      sci_sendmsg SCI_DOCUMENTSTART						// deselect
      rm -rf "$(tempfile)" "$(ascfile)"						// cleanup temp files
      npp_save
      

      (and I have similar ones for gpg-sign and gpg-verify – though honestly, I haven’t used any of them much in the past year or two)

      T 1 Reply Last reply Jul 9, 2023, 4:35 AM Reply Quote 5
      • T
        Tony F @PeterJones
        last edited by Jul 9, 2023, 4:35 AM

        @PeterJones thanks v much

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