51Degrees Pipeline for Python

fiftyone_pipeline_core.keymask Namespace Reference

Functions

 mask_licence_key (key)
 A licence key with each character hidden by an asterisk, except the last four.
 _mask_parameter (match)
 mask_licence_keys_in_text (text)
 Text, such as a URL or an error message, with every licence key in a licence parameter masked as :func:mask_licence_key does.

Variables

int VISIBLE_CHARACTERS = 4
 _LICENCE_PARAMETER
 _KEY_SEPARATOR = re.compile(r"(\||%7C)", re.IGNORECASE)

Function Documentation

◆ _mask_parameter()

_mask_parameter ( match)
protected

◆ mask_licence_key()

mask_licence_key ( key)

A licence key with each character hidden by an asterisk, except the last four.

A key of four or fewer characters is hidden entirely. @type key: str

Parameters
keyThe licence key @rtype: str
Returns
: The masked key, of the same length

◆ mask_licence_keys_in_text()

mask_licence_keys_in_text ( text)

Text, such as a URL or an error message, with every licence key in a licence parameter masked as :func:mask_licence_key does.

A list of keys separated by a vertical bar is masked key by key. @type text: str

Parameters
textThe text that may hold a licence key @rtype: str
Returns
: The text with the keys masked

Variable Documentation

◆ _KEY_SEPARATOR

fiftyone_pipeline_core.keymask._KEY_SEPARATOR = re.compile(r"(\||%7C)", re.IGNORECASE)
protected

◆ _LICENCE_PARAMETER

fiftyone_pipeline_core.keymask._LICENCE_PARAMETER
protected
Initial value:
= re.compile(
r"(licen[cs]e(?:_?keys?)?=)([^&\s'\"#]*)", re.IGNORECASE)

◆ VISIBLE_CHARACTERS

int fiftyone_pipeline_core.keymask.VISIBLE_CHARACTERS = 4