# CardGenerator Module

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_cryptoflex`()

    Generate the Filesystem and SAM of a cryptoflex card

  `__generate_ePass`()

    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_iso_card`()
  `__generate_nPA`()
  `generateCard`()

    Generate a new card

  `getCard`()

    Get the MF and SAM from the current card

  `readDatagroups`(datasetfile)

    Read Datagroups from file

  `setCard`(mf=None, sam=None)

    Set the MF and SAM of the current card