'Encodes the value using DER
:param force:
If the encoded contents already exist, clear them and regenerate
to ensure they are in DER format instead of BER format
:return:
A byte string of the DER-encoded value'

def dump(self, force=False):

    contents = self.contents
    if ((self._header is None) or force):
        if (isinstance(self, Constructable) and self._indefinite):
            self.method = 0
        header = _dump_header(self.class_, self.method, self.tag, self.contents)
        trailer = ''
        if (self.tag_type == u'explicit'):
            container = Asn1Value()
            container.method = 1
            container.class_ = self.explicit_class
            container.tag = self.explicit_tag
            container.contents = ((header + self.contents) + trailer)
            container.dump()
            header = (container._header + header)
            trailer += container._trailer
        self._header = header
        self._trailer = trailer
    return ((self._header + contents) + self._trailer)
