Package oauth2client :: Module crypt :: Class Verifier |
[hide private]
[frames] | no frames]

# Class Verifier

source code

    Verifies the signature on a message.

Instance Methods | [hide private]
__init__(self, pubkey) Constructor. | source code
verify(self, message, signature) Verifies a message against a signature. | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Static Methods | [hide private]
from_string(key_pem, is_x509_cert) Construct a Verified instance from a string. | source code

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, pubkey) (Constructor) | source code
    Constructor.

    Args:
      pubkey, OpenSSL.crypto.PKey, The public key to verify with.
Overrides: object.__init__

### verify(self, message, signature) | source code
    Verifies a message against a signature.

    Args:
      message: string, The message to verify.
      signature: string, The signature on the message.

    Returns:
      True if message was singed by the private key associated with the public
      key that this object was constructed with.

### from_string(key_pem, is_x509_cert) Static Method | source code
    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.

    Raises:
      OpenSSL.crypto.Error if the key_pem can't be parsed.