'Loads a key in PKCS#1 DER or PEM format.
:param keyfile: contents of a DER- or PEM-encoded file that contains
the public key.
:param format: the format of the file to load; \'PEM\' or \'DER\'
:return: a PublicKey object'

@classmethod
def load_pkcs1(cls, keyfile, format='PEM'):

    methods = {'PEM': cls._load_pkcs1_pem, 'DER': cls._load_pkcs1_der}
    if (format not in methods):
        formats = ',    '.join(sorted(methods.keys()))
        raise ValueError(('Unsupported    format:    %r,    try    one    of    %s' % (format, formats)))
    method = methods[format]
    return method(keyfile)
