ait.dsn.encrypt.kmc_encrypter package

Module contents

class ait.dsn.encrypt.kmc_encrypter.KmcSdlsEncrypter

Bases: BaseEncrypter

KMC SDLS Backend Encrypter

This requires the SdlsClient Python library to be installed and KMC to be installed.

close()

Release the reference to the KMC client

configure(**kwargs)

Configures this encrypter instance.

Checks for KMC properties as provided via the kwargs or AIT configuration. :param kwargs: Optional keyword arguments

connect()

Connect to an KMC SDSL service instance During the configure() step, configuration information was retrieved. If properties file was provided, then it will be used. Else the property list (potentially empty) will be used.

Except

SdlsClientException if SDLS Client error occurs

Except

Exception if other error occurs

decrypt(input_bytes)

Decrypts a byte-array using the KMC Encryption client.

Per the KMC specification, the result of the successful decryption is only the user-data/payload/PDU portion of the whole Telecommand

Param

input_bytes Original byte-array to be decrypted

Returns

EncryptResult object with result or errors

encrypt(input_bytes)

Encrypts a byte-array using the KMC Encrypter

Param

input_bytes Original byte-array to be encrypted

Returns

EncryptResult object with result or errors

format_config_list(cfg_list)

Applies formatting to the incoming list of configuration properties. Currently, it just expands values for envVars and ~ :param cfg_list: Input config list :return: Formatted version of config list

is_connected()

Returns True if connected, False otherwise

kmclib_envvar = 'KMC_HOME'
kmclib_envvar_required = False
prop_kmc_properties = 'kmc_properties'
prop_kmc_property_file = 'kmc_property_file'
show_config()

Return encrypter name and associated configuration :return: Configuration information