latest.ipv8.attestation.signed_object
Module Contents
Classes
To reach immutability different objects will have to be signed to reach non-repudiation. |
Attributes
- latest.ipv8.attestation.signed_object.T
- class latest.ipv8.attestation.signed_object.AbstractSignedObject(private_key: latest.ipv8.types.PrivateKey | None = None, signature: bytes | None = None)
To reach immutability different objects will have to be signed to reach non-repudiation. Examples are Tokens, Metadata and Attestation objects.
This class handles many of the commonly required interactions for this type of signed data.
- verify(public_key: latest.ipv8.types.PublicKey) bool
Verify if a public key belongs to this object.
- Returns:
whether the given public key has signed for this object.
- _sign(private_key: latest.ipv8.types.PrivateKey | None = None, signature: bytes | None = None) None
Add a signature to this data. Supply either your private key for signing or pass an existing signature.
- Parameters:
private_key – the private key to sign with.
signature – the signature to adapt.
- abstract get_plaintext() bytes
Retrieve the content that needs to be signed, in serialized form (bytes).