virgil_sdk.signers package¶
Submodules¶
virgil_sdk.signers.model_signer module¶
-
class
virgil_sdk.signers.model_signer.
ModelSigner
(card_crypto)[source]¶ Bases:
object
The ModelSigner class provides signing operation for RawSignedModel.
-
SELF_SIGNER
= 'self'¶
-
VIRGIL_SIGNER
= 'virgil'¶
-
self_sign
(model, signer_private_key, signature_snapshot=None, extra_fields=None)[source]¶ Adds owner’s signature to the specified RawSignedModel using specified signer.
Parameters: - model – The instance of RawSignedModel to be signed.
- signer_private_key – The instance of PrivateKey to sign with.
- signature_snapshot – Some additional raw bytes to be signed with model.
- extra_fields – Dictionary with additional data to be signed with model.
-
sign
(model, signer, signer_private_key, signature_snapshot=None, extra_fields=None)[source]¶ Adds signature to the specified RawSignedModel using specified signer.
Parameters: - model – The instance of RawSignedModel to be signed.
- signer –
- signer_private_key – The instance of PrivateKey to sign with.
- signature_snapshot – Some additional raw bytes to be signed with model.
- extra_fields – Dictionary with additional data to be signed with model.
-