epa-encrypt-region

epa-encrypt-region is an interactive autoloaded compiled Lisp function in `epa.el'.

It is bound to <menu-bar> <tools> <encryption-decryption> <encrypt-region>.

(epa-encrypt-region START END RECIPIENTS SIGN SIGNERS)

This function is for interactive use only.

Encrypt the current region between START and END for RECIPIENTS.

Don't use this command in Lisp programs!
Since this function operates on regions, it does some tricks such
as coding-system detection and unibyte/multibyte conversion. If
you are sure how the data should be treated, you should consider
using the string based counterpart `epg-encrypt-string', or the
file based counterpart `epg-encrypt-file' instead.

For example:

(let ((context (epg-make-context 'OpenPGP)))
(epg-encrypt-string
context
(encode-coding-string (buffer-substring start end) 'utf-8)
nil))