def decrypt(self, data, oaep_hash_fn_name=None, mgf1_hash_fn_name=None):
		""" Decrypt a data that used PKCS1 OAEP protocol

		:param data: data to decrypt
		:param oaep_hash_fn_name: hash function name to use with OAEP
		:param mgf1_hash_fn_name: hash function name to use with MGF1 padding
		:return: bytes
		"""

		if self.__private_key is None:
			raise ValueError('Unable to call this method. Private key must be set')

		if oaep_hash_fn_name is None:
			oaep_hash_fn_name = self.__class__.__default_oaep_hash_function_name__

		if mgf1_hash_fn_name is None:
			mgf1_hash_fn_name = self.__class__.__default_mgf1_hash_function_name__

		oaep_hash_cls = getattr(hashes, oaep_hash_fn_name)
		mgf1_hash_cls = getattr(hashes, mgf1_hash_fn_name)

		return self.__private_key.decrypt(
			data,
			padding.OAEP(
				mgf=padding.MGF1(algorithm=mgf1_hash_cls()),
				algorithm=oaep_hash_cls(),
				label=None
			)
		)
def decrypt ( self , data , oaep_hash_fn_name = None , mgf1_hash_fn_name = None ) : if self . __private_key is None : raise ValueError ( 'Unable to call this method. Private key must be set' ) if oaep_hash_fn_name is None : oaep_hash_fn_name = self . __class__ . __default_oaep_hash_function_name__ if mgf1_hash_fn_name is None : mgf1_hash_fn_name = self . __class__ . __default_mgf1_hash_function_name__ oaep_hash_cls = getattr ( hashes , oaep_hash_fn_name ) mgf1_hash_cls = getattr ( hashes , mgf1_hash_fn_name ) return self . __private_key . decrypt ( data , padding . OAEP ( mgf = padding . MGF1 ( algorithm = mgf1_hash_cls ( ) ) , algorithm = oaep_hash_cls ( ) , label = None ) )
Decrypt a data that used PKCS1 OAEP protocol

		:param data: data to decrypt
		:param oaep_hash_fn_name: hash function name to use with OAEP
		:param mgf1_hash_fn_name: hash function name to use with MGF1 padding
		:return: bytes