@classmethod<EOL><INDENT>def fromOctetString(cls, value, internalFormat=False, prepend=None, padding=<NUM_LIT:0>):<DEDENT>
value = SizedInteger(integer.from_bytes(value) >> padding).setBitLength(len(value) * <NUM_LIT:8> - padding)<EOL>if prepend is not None:<EOL><INDENT>value = SizedInteger(<EOL>(SizedInteger(prepend) << len(value)) | value<EOL>).setBitLength(len(prepend) + len(value))<EOL><DEDENT>if not internalFormat:<EOL><INDENT>value = cls(value)<EOL><DEDENT>return value<EOL>
Create a |ASN.1| object initialized from a string.

        Parameters
        ----------
        value: :class:`str` (Py2) or :class:`bytes` (Py3)
            Text string like '\\\\x01\\\\xff' (Py2) or b'\\\\x01\\\\xff' (Py3)