class PublicKey[A: Algorithm = Algorithm]
A key-agreement public key for algorithm.
Attributes#
| Attribute | Type | Description |
|---|---|---|
label | str = 'KeyAgreement.PublicKey' |
Functions#
__init__#
__init__(algorithm, material) -> None| Parameter | Type | Description |
|---|---|---|
algorithm | A | |
material | Material |
def __init__(self, algorithm: A, material: Material) -> None:
self._algorithm = algorithm
self._material = materialto_json#
to_json() -> dict[str, str]{"_id": label, "algorithm": name}, never the key material.
Returns dict[str, str]
def to_json(self) -> dict[str, str]:
"""``{"_id": label, "algorithm": name}``, never the key material."""
return {"_id": self.label, "algorithm": self.algorithm.name}