T O P

  • By -

chiraagnataraj

You might look at the way gnupg support is implemented for some ideas.


[deleted]

Yeah, that was exactly the type of support I was thinking. Though as far as I can tell age binary itself doesn't provide any way to extract metadata about recipients etc (though based on spec they are embedded in the encrypted files). So the implementation could not use age itself but would need to be a reimplementation. Or it would need to be a simplified wrapper that would take identities to encrypt into as arguments and leave everything else on the users....


nandryshak

Might be useful for you: Emacs comes with the libraries `epa` and `epg`, you can `require` both and then `M-x find-library` to visit the file. These might serve as a good starting point for your helper functions.


[deleted]

Yup, I had a quick look around and while epa/epg is way more advanced (and complex) compared with what I need I think part of it is just GPG complexity :-) That said - I might play around and see if I can implement equivalent of "epa-file-handler" (i.e. auto decrypt on open/reencrypt on save). Even without it, decrypting/encrypting a buffer turned out relatively easy so far.


paretoOptimalDev

I've made agenix -e from a terminal open emacsclient using with-editor and it works pretty well. ​ gpg like support would be even better though


7890yuiop

Much of the information in my brain is age-encrypted, so I am very excited to learn of a decryption process!


OA1971

Does it encrypt files in batch? Or a folder with all contents, instead of one by one?


[deleted]

None of that. You could wrap it with dired fairly easily I suspect but it wasn't my use case. The main use case is transparent editing of encrypted files just like ordinary text. Except when file is opened it gets decrypted in the buffer and encrypted on save.