epa-sign-region

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

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

(epa-sign-region START END SIGNERS MODE)

This function is for interactive use only.

Sign the current region between START and END by SIGNERS keys selected.

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-sign-string', or the file
based counterpart `epg-sign-file' instead.

For example:

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