__init__(self,
key,
hashAlgo,
mgfunc,
label)
(Constructor)
|
|
Initialize this PKCS#1 OAEP cipher object.
- Parameters:
key (an RSA key object) - If a private half is given, both encryption and decryption are possible.
If a public half is given, only encryption is possible.
hashAlgo (hash object) - The hash function to use. This can be a module under Crypto.Hash
or an existing hash object created from any of such modules. If not specified,
Crypto.Hash.SHA (that is, SHA-1) is used.
mgfunc (callable) - A mask generation function that accepts two parameters: a string to
use as seed, and the lenth of the mask to generate, in bytes.
If not specified, the standard MGF1 is used (a safe choice).
label (string) - A label to apply to this particular encryption. If not specified,
an empty string is used. Specifying a label does not improve
security.
Attention:
Modify the mask generation function only if you know what you are doing.
Sender and receiver must use the same one.
|