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

# Class Signer

source code

    Signs messages with a private key.

Instance Methods | [hide private]
__init__(self, pkey) Constructor. | source code
sign(self, message) Signs a message. | 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, password='notasecret') Construct a Signer instance from a string. | source code

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

Method Details | [hide private]

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

    Args:
      pkey, OpenSSL.crypto.PKey, The private key to sign with.
Overrides: object.__init__

### sign(self, message) | source code
    Signs a message.

    Args:
      message: string, Message to be signed.

    Returns:
      string, The signature of the message for the given key.

### from_string(key, password='notasecret') Static Method | source code
    Construct a Signer instance from a string.

    Args:
      key: string, private key in P12 format.
      password: string, password for the private key file.

    Returns:
      Signer instance.

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