Skip to main content

HostDeriveInputWithStore

Trait HostDeriveInputWithStore 

Source
pub trait HostDeriveInputWithStore<T>: HasData + Send {
    // Required methods
    fn drop(
        accessor: &Accessor<T, Self>,
        rep: Resource<DeriveInput>,
    ) -> impl Future<Output = Result<()>> + Send
       where Self: Sized;
    fn derive_bits(
        accessor: &Accessor<T, Self>,
        self_: Resource<DeriveInput>,
        length: Option<u32>,
    ) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send;
}

Required Methods§

Source

fn drop( accessor: &Accessor<T, Self>, rep: Resource<DeriveInput>, ) -> impl Future<Output = Result<()>> + Send
where Self: Sized,

Source

fn derive_bits( accessor: &Accessor<T, Self>, self_: Resource<DeriveInput>, length: Option<u32>, ) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send

The derived bits.

length is in bits, WebCrypto’s denomination for this parameter, and must be a multiple of 8 — none of this package’s implementations serve sub-byte outputs (the platform zero-pads them; a consumer wanting truncation truncates). none means the source’s natural output length; sources without one — every KDF, whose output length is a caller choice — fail error.other, which is the platform’s own null-length behavior for them (HKDF and PBKDF2 throw OperationError where the agreements return the whole secret).

Fails error.not-permitted without the can-derive-bits grant. Fallible even when granted: a platform-resident source may be usable but unreadable.

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§