pub trait HostWithStore<T>: HasData + Send {
// Required methods
fn import_key_raw(
accessor: &Accessor<T, Self>,
raw: Vec<u8>,
options: Resource<MacKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send;
fn import_key_jwk(
accessor: &Accessor<T, Self>,
jwk: String,
options: Resource<MacKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send;
fn generate_key(
accessor: &Accessor<T, Self>,
length: Option<u32>,
options: Resource<MacKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send;
fn derive_key(
accessor: &Accessor<T, Self>,
input: Resource<DeriveInput>,
length: Option<u32>,
options: Resource<MacKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send;
fn unwrap_key_raw(
accessor: &Accessor<T, Self>,
input: Resource<UnwrapInput>,
options: Resource<MacKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send;
fn unwrap_key_jwk(
accessor: &Accessor<T, Self>,
input: Resource<UnwrapInput>,
options: Resource<MacKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send;
}Required Methods§
Sourcefn import_key_raw(
accessor: &Accessor<T, Self>,
raw: Vec<u8>,
options: Resource<MacKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send
fn import_key_raw( accessor: &Accessor<T, Self>, raw: Vec<u8>, options: Resource<MacKeyOptions>, ) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send
Import raw key material as an HMAC-SHA-1 key. See
hmac-sha2.import-key-raw for the key-length contract.
Sourcefn import_key_jwk(
accessor: &Accessor<T, Self>,
jwk: String,
options: Resource<MacKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send
fn import_key_jwk( accessor: &Accessor<T, Self>, jwk: String, options: Resource<MacKeyOptions>, ) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send
Import an RFC 7517 JSON Web Key as an HMAC-SHA-1 key (alg, when
present, must be "HS1"). See hmac-sha2.import-key-jwk.
Sourcefn generate_key(
accessor: &Accessor<T, Self>,
length: Option<u32>,
options: Resource<MacKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send
fn generate_key( accessor: &Accessor<T, Self>, length: Option<u32>, options: Resource<MacKeyOptions>, ) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send
Generate a fresh random HMAC-SHA-1 key. See
hmac-sha2.generate-key for the length contract; none means
SHA-1’s block size, 512 bits.
Sourcefn derive_key(
accessor: &Accessor<T, Self>,
input: Resource<DeriveInput>,
length: Option<u32>,
options: Resource<MacKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send
fn derive_key( accessor: &Accessor<T, Self>, input: Resource<DeriveInput>, length: Option<u32>, options: Resource<MacKeyOptions>, ) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send
Mint a key from a parameterized derivation. See
hmac-sha2.derive-key.
Sourcefn unwrap_key_raw(
accessor: &Accessor<T, Self>,
input: Resource<UnwrapInput>,
options: Resource<MacKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send
fn unwrap_key_raw( accessor: &Accessor<T, Self>, input: Resource<UnwrapInput>, options: Resource<MacKeyOptions>, ) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send
Mint a key from unwrapped key material read as raw bytes. See
hmac-sha2.unwrap-key-raw.
Sourcefn unwrap_key_jwk(
accessor: &Accessor<T, Self>,
input: Resource<UnwrapInput>,
options: Resource<MacKeyOptions>,
) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send
fn unwrap_key_jwk( accessor: &Accessor<T, Self>, input: Resource<UnwrapInput>, options: Resource<MacKeyOptions>, ) -> impl Future<Output = Result<Result<Resource<MacKey>, Error>>> + Send
Mint a key from unwrapped key material read as an RFC 7517 JSON
Web Key. See hmac-sha2.unwrap-key-jwk.
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.