# File lib/prawn/security.rb, line 240 def encrypted_object(key) @on_encode.call(self) if @on_encode output = "#{@identifier} #{gen} obj\n" << Prawn::EncryptedPdfObject(data, key, @identifier, gen) << "\n" if @stream output << "stream\n" << Document::Security.encrypt_string(@stream, key, @identifier, gen) << "\nendstream\n" end output << "endobj\n" end