key
¤
KeyResolver
dataclass
¤
Bases: HTTPSignatureKeyResolver
KeyResolver provides public and private keys.
At this time, multiple keys and/or key types are not supported. Keys must be Ed25519 keys and have an ID of DEFAULT_KEY_ID.
public_key_from_pem
¤
public_key_from_pem(pem: str | bytes) -> Ed25519PublicKey
Returns an Ed25519 public key given a PEM representation.
public_key_from_bytes
¤
public_key_from_bytes(key: bytes) -> Ed25519PublicKey
Returns an Ed25519 public key from 32 raw bytes.
private_key_from_pem
¤
private_key_from_pem(
pem: str | bytes, password: bytes | None = None
) -> Ed25519PrivateKey
Returns an Ed25519 private key given a PEM representation and optional password.
private_key_from_bytes
¤
private_key_from_bytes(key: bytes) -> Ed25519PrivateKey
Returns an Ed25519 private key from 32 raw bytes.