encrypt support for document class