CardGenerator Module

Inheritance diagram of virtualsmartcard.CardGenerator
class virtualsmartcard.CardGenerator.CardGenerator(card_type=None, sam=None, mf=None)

Bases: object

This class is used to generate the SAM and filesystem for the different supported card types. It is also able used for persistent storage (in encrypted form) of the card on disks.


Generate the Filesystem and SAM of a cryptoflex card


Generate the MF and SAM of an ICAO passport. This method is responsible for generating the filesystem and filling it with content. Therefore it must interact with the user by prompting for the MRZ and optionally for the path to a photo.


Generate a new card


Get the MF and SAM from the current card


Read Datagroups from file

setCard(mf=None, sam=None)

Set the MF and SAM of the current card