pub trait HostSigningKeyWithStore<T>: HasData + Send {
// Required methods
fn drop(
accessor: &Accessor<T, Self>,
rep: Resource<SigningKey>,
) -> impl Future<Output = Result<()>> + Send
where Self: Sized;
fn sign(
accessor: &Accessor<T, Self>,
self_: Resource<SigningKey>,
data: StreamReader<u8>,
) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send;
fn export_key_jwk(
accessor: &Accessor<T, Self>,
self_: Resource<SigningKey>,
) -> impl Future<Output = Result<Result<String, Error>>> + Send;
fn export_key_pkcs8(
accessor: &Accessor<T, Self>,
self_: Resource<SigningKey>,
) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send;
fn to_wrap_input_jwk(
accessor: &Accessor<T, Self>,
self_: Resource<SigningKey>,
) -> impl Future<Output = Result<Result<Resource<WrapInput>, Error>>> + Send;
fn to_wrap_input_pkcs8(
accessor: &Accessor<T, Self>,
self_: Resource<SigningKey>,
) -> impl Future<Output = Result<Result<Resource<WrapInput>, Error>>> + Send;
}Required Methods§
fn drop(
accessor: &Accessor<T, Self>,
rep: Resource<SigningKey>,
) -> impl Future<Output = Result<()>> + Sendwhere
Self: Sized,
Sourcefn sign(
accessor: &Accessor<T, Self>,
self_: Resource<SigningKey>,
data: StreamReader<u8>,
) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send
fn sign( accessor: &Accessor<T, Self>, self_: Resource<SigningKey>, data: StreamReader<u8>, ) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send
Sign an entire byte stream. A success resolves only after the stream is fully drained (its writer dropped). The minting interface documents the signature’s wire format.
Fails only for operational reasons (error.other).
Sourcefn export_key_jwk(
accessor: &Accessor<T, Self>,
self_: Resource<SigningKey>,
) -> impl Future<Output = Result<Result<String, Error>>> + Send
fn export_key_jwk( accessor: &Accessor<T, Self>, self_: Resource<SigningKey>, ) -> impl Future<Output = Result<Result<String, Error>>> + Send
The private key as a JWK (an RFC 8037 OKP private key for
Ed25519, an EC private key for ECDSA). Fails
error.not-extractable unless the key was minted extractable;
fallible beyond the gate like every export (README.md,
“Extractability”). See mac-key.export-key-jwk for the
package-wide JWK contract.
Sourcefn export_key_pkcs8(
accessor: &Accessor<T, Self>,
self_: Resource<SigningKey>,
) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send
fn export_key_pkcs8( accessor: &Accessor<T, Self>, self_: Resource<SigningKey>, ) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send
The private key as a PKCS#8 PrivateKeyInfo (DER), behind the
same extractability gate as export-key-jwk.
Sourcefn to_wrap_input_jwk(
accessor: &Accessor<T, Self>,
self_: Resource<SigningKey>,
) -> impl Future<Output = Result<Result<Resource<WrapInput>, Error>>> + Send
fn to_wrap_input_jwk( accessor: &Accessor<T, Self>, self_: Resource<SigningKey>, ) -> impl Future<Output = Result<Result<Resource<WrapInput>, Error>>> + Send
The private-key JWK serialization as a wrap-input, for
wrapping under another key (see the wrapping interface).
Behind the same extractability gate as export-key-jwk, and
fallible beyond it like every export; the material itself
never reaches the caller.
Sourcefn to_wrap_input_pkcs8(
accessor: &Accessor<T, Self>,
self_: Resource<SigningKey>,
) -> impl Future<Output = Result<Result<Resource<WrapInput>, Error>>> + Send
fn to_wrap_input_pkcs8( accessor: &Accessor<T, Self>, self_: Resource<SigningKey>, ) -> impl Future<Output = Result<Result<Resource<WrapInput>, Error>>> + Send
The PKCS#8 serialization as a wrap-input, behind the same
gate.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.