def encryption_type_str(self, val=None): """Returns the encryption type string for the given value. """ if val == None: val = _fko.get_spa_encryption_type(self.ctx) if val == FKO_ENCRYPTION_RIJNDAEL: ets = "Rijndael (AES)" elif val == FKO_ENCRYPTION_GPG: ets = "GPG" else: ets = "Unknown encryption type" return ets
def encryption_type(self, val=None): """Get or set the encryption type. If no argument is given, the current value is returned. Otherwise, encryption type will be set to the given value. The encryption type parameter is an integer value. Constants have been defined to represent these values. Currently, the only supported encryption types are: FKO_ENCRYPTION_RIJNDAEL AES - the default libfko encryption algorithm. FKO_ENCRYPTION_GPG GnuPG encryption (if supported by the underlying libfko implementation). """ if val != None: _fko.set_spa_encryption_type(self.ctx, val) else: return _fko.get_spa_encryption_type(self.ctx)
def encryption_type_str(self, val=None): """Returns the encryption type string for the given value. If no value is given, the encryption type for the current context is returned. """ if val == None: val = _fko.get_spa_encryption_type(self.ctx) if val == FKO_ENCRYPTION_INVALID_DATA: ets = "invalid_data" elif val == FKO_ENCRYPTION_UNKNOWN: ets = "unknown" elif val == FKO_ENCRYPTION_RIJNDAEL: ets = "Rijndael (AES)" elif val == FKO_ENCRYPTION_GPG: ets = "GPG" else: ets = "Unknown encryption type" return ets