@staticmethod<EOL><INDENT>def from_string(key_pem, is_x509_cert):<DEDENT>
if is_x509_cert:<EOL><INDENT>key_pem = _helpers._to_bytes(key_pem)<EOL>pemLines = key_pem.replace(b'<STR_LIT:U+0020>', b'<STR_LIT>').split()<EOL>certDer = _helpers._urlsafe_b64decode(b'<STR_LIT>'.join(pemLines[<NUM_LIT:1>:-<NUM_LIT:1>]))<EOL>certSeq = DerSequence()<EOL>certSeq.decode(certDer)<EOL>tbsSeq = DerSequence()<EOL>tbsSeq.decode(certSeq[<NUM_LIT:0>])<EOL>pubkey = RSA.importKey(tbsSeq[<NUM_LIT:6>])<EOL><DEDENT>else:<EOL><INDENT>pubkey = RSA.importKey(key_pem)<EOL><DEDENT>return PyCryptoVerifier(pubkey)<EOL>
Construct a Verified instance from a string.

        Args:
            key_pem: string, public key in PEM format.
            is_x509_cert: bool, True if key_pem is an X509 cert, otherwise it
                          is expected to be an RSA key in PEM format.

        Returns:
            Verifier instance.