def encode(self, envelope, session, public_key=None, oaep_hash_fn_name=None, mgf1_hash_fn_name=None, **kwargs):
		""" :meth:`.WMessengerOnionCoderLayerProto.encode` method implementation.

		:param envelope: original envelope
		:param session: original session
		:param public_key: public key to encrypt
		:param oaep_hash_fn_name: OAEP hash function name
		:param mgf1_hash_fn_name: MGF1 hash function name
		:param kwargs: additional arguments

		:return: WMessengerBytesEnvelope
		"""
		message = public_key.encrypt(
			envelope.message(), oaep_hash_fn_name=oaep_hash_fn_name, mgf1_hash_fn_name=mgf1_hash_fn_name
		)
		return WMessengerBytesEnvelope(message, meta=envelope)
:meth:`.WMessengerOnionCoderLayerProto.encode` method implementation.

		:param envelope: original envelope
		:param session: original session
		:param public_key: public key to encrypt
		:param oaep_hash_fn_name: OAEP hash function name
		:param mgf1_hash_fn_name: MGF1 hash function name
		:param kwargs: additional arguments

		:return: WMessengerBytesEnvelope