People using emacs to edit text boxes, for example when using It's all text! or org-protocol can use M-x rot13-region (after the text-to-be-rot13'ed is marked/selected).
Interestingly, there's also M-x toggle-rot13-mode, which, when enabled, translates the current window to rot13, including your input.
For non-ascii encoding, maybe base64 would be useful? M-x base64-encode-region and M-x base64-decode-region are your friends here. If people find substitution cyphers to easy tor read, the text could simply be reverted (M-x reverse-region). That should work well enough for most people...
Edit: quick hack for reversed base64:
(defun toggle-reverse-base64-region (b e)
"Instead of rot13, we can use reversed base64 to hide text. The
encoded text is prefixed with \"rb64:\"."
(interactive "r")
(let*
((str (buffer-substring b e))
(match (string-match "^rb64:\\(.*\\)" str))
(revstr (lambda (str) (concat (reverse (string-to-list str)))))
(code
(if match
(funcall revstr (base64-decode-string (match-string 1 str)))
(concat "rb64:" (base64-encode-string (funcall revstr str))))))
(kill-region b e)
(insert code)))
rot13.com is a service frequently used here to hide spoilers. I really hate it, though. If I had the time, I would build a simple, but much better alternative. Maybe somebody has more time to do that, so I'll share my rough specification:
The only important design problem I don't know how best to solve is making the encryption work for Unicode, with the following three constraints: making it a reciprocal cypher, outputting visually nice strings, and making it map ASCII to ASCII. One possible solution is to drop the constraint that it is a reciprocal cypher. For this service it is probably not crucial anyway: the ciphertext can be base64, with some escape prefix distinguishing it from plaintext.
After writing the above, I found this LW thread: Does anyone else find ROT13 spoilers as annoying as I do? There were several suggestions there, and two of the commenters, sketerpot and LightningRose even coded their own solutions to the spoiler problem. Each solution had some merit, and LightningRose's in particular was far superior to the rot13.com site I used to use, but basically, they only dealt with the third point of my proposal.
Is there anything like what I envision? Is anyone interested in building it? What changes or extra features would you like to see?