comparison sat/memory/encryption.py @ 2752:1fa615faec8b

core (constants): added a constant for "encrypted"
author Goffi <goffi@goffi.org>
date Fri, 04 Jan 2019 18:46:02 +0100
parents 4b8271399f67
children 003b8b4b56a7
comparison
equal deleted inserted replaced
2751:286a32a187e7 2752:1fa615faec8b
378 378
379 This should be used in the post_treat workflow of MessageReceived trigger of 379 This should be used in the post_treat workflow of MessageReceived trigger of
380 the plugin 380 the plugin
381 @param mess_data(dict): message data as used in post treat workflow 381 @param mess_data(dict): message data as used in post treat workflow
382 """ 382 """
383 mess_data['encrypted'] = True 383 mess_data[C.MESS_KEY_ENCRYPTED] = True
384 return mess_data 384 return mess_data
385 385
386 def markAsTrusted(self, mess_data): 386 def markAsTrusted(self, mess_data):
387 """Helper methor to mark a message as sent from a trusted entity. 387 """Helper methor to mark a message as sent from a trusted entity.
388 388
389 This should be used in the post_treat workflow of MessageReceived trigger of 389 This should be used in the post_treat workflow of MessageReceived trigger of
390 the plugin 390 the plugin
391 @param mess_data(dict): message data as used in post treat workflow 391 @param mess_data(dict): message data as used in post treat workflow
392 """ 392 """
393 mess_data['trusted'] = True 393 mess_data[C.MESS_KEY_TRUSTED] = True
394 return mess_data 394 return mess_data
395 395
396 def markAsUntrusted(self, mess_data): 396 def markAsUntrusted(self, mess_data):
397 """Helper methor to mark a message as sent from an untrusted entity. 397 """Helper methor to mark a message as sent from an untrusted entity.
398 398