Skip to main content

HostWithStore

Trait HostWithStore 

Source
pub trait HostWithStore<T>:
    HasData
    + HostPasswordWithStore<T>
    + Send {
    // Required methods
    fn import_password(
        accessor: &Accessor<T, Self>,
        raw: Vec<u8>,
        options: Resource<DeriveOptions>,
    ) -> impl Future<Output = Result<Result<Resource<Password>, Error>>> + Send;
    fn unwrap_password(
        accessor: &Accessor<T, Self>,
        input: Resource<UnwrapInput>,
        options: Resource<DeriveOptions>,
    ) -> impl Future<Output = Result<Result<Resource<Password>, Error>>> + Send;
}

Required Methods§

Source

fn import_password( accessor: &Accessor<T, Self>, raw: Vec<u8>, options: Resource<DeriveOptions>, ) -> impl Future<Output = Result<Result<Resource<Password>, Error>>> + Send

Import a password.

Empty passwords are accepted, unlike hkdf.import-ikm: RFC 8018 admits an empty P and the platform serves it. Fails error.not-permitted if options grants nothing, per the package-wide options contract (see README.md).

Source

fn unwrap_password( accessor: &Accessor<T, Self>, input: Resource<UnwrapInput>, options: Resource<DeriveOptions>, ) -> impl Future<Output = Result<Result<Resource<Password>, Error>>> + Send

Mint a password from unwrapped bytes (see the wrapping interface), subject to import-password’s contract. See hkdf.unwrap-ikm for the model — the grants come from options alone, and non-extractability stays structural. input is consumed.

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.

Implementors§