key
¤
KeyResolver
dataclass
¤
KeyResolver(
key_id: str,
public_key: Optional[Ed25519PublicKey] = None,
private_key: Optional[Ed25519PrivateKey] = None,
)
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: Union[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: Union[str, bytes], password: Optional[bytes] = 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.