linotp.lib.crypto.encrypted_data module

This module implements the encapsulation of encrypted data which for example are used in config entries

class linotp.lib.crypto.encrypted_data.EncryptedData(encrypted_str)

Bases: str

preserve encrypted data throughout the LinOTP config handling to support late decryption

static from_unencrypted(value: str) EncryptedData

to create an EncrytedData obejct from a plaintext password for the encryption it is required to have the value encoded as utf-8

Parameters

value – value is a unicode string

Returns

new EncrytedData object

get_unencrypted() str

return the decrypted data