pdftools_sdk.crypto.providers.pkcs11.device_list
Classes
|
The list of devices managed by a PKCS#11 module |
- class pdftools_sdk.crypto.providers.pkcs11.device_list.DeviceList(handle)[source]
Bases:
_NativeObject
,list
The list of devices managed by a PKCS#11 module
- get_single() Device [source]
Get the single device
- Return type:
- Raises:
pdftools_sdk.not_found_error.NotFoundError – No device was found. Make sure the device is connected and the right PKCS#11 modules has been loaded.
OperationError – More than one device available. Choose the right one from the device list, e.g. by looking at
pdftools_sdk.crypto.providers.pkcs11.device.Device.description
or itspdftools_sdk.crypto.providers.pkcs11.session.Session.certificates
.
- remove(index: int) None [source]
Remove first occurrence of value.
Raises ValueError if the value is not present.
- extend(items: DeviceList) None [source]
Extend list by appending elements from the iterable.
- pop(index: int = -1) Any [source]
Remove and return item at index (default last).
Raises IndexError if list is empty or index is out of range.
- copy() DeviceList [source]
Return a shallow copy of the list.
- sort(key=None, reverse=False) None [source]
Sort the list in ascending order and return None.
The sort is in-place (i.e. the list itself is modified) and stable (i.e. the order of two equal elements is maintained).
If a key function is given, apply it once to each list item and sort them, ascending or descending, according to their function values.
The reverse flag can be set to sort in descending order.