Skip to main content

HostWithStore

pub trait HostWithStore<T>: HasData + Send {
    // Required methods
    fn import_encryption_key_spki(
        accessor: &Accessor<T, Self>,
        variant: RsaVariant,
        spki: Vec<u8>,
    ) -> impl Future<Output = Result<Result<Resource<EncryptionKey>, Error>>> + Send;
    fn import_encryption_key_jwk(
        accessor: &Accessor<T, Self>,
        variant: RsaVariant,
        jwk: String,
    ) -> impl Future<Output = Result<Result<Resource<EncryptionKey>, Error>>> + Send;
}

Required Methods§

Source

fn import_encryption_key_spki( accessor: &Accessor<T, Self>, variant: RsaVariant, spki: Vec<u8>, ) -> impl Future<Output = Result<Result<Resource<EncryptionKey>, Error>>> + Send

Import a public key as an X.509 SubjectPublicKeyInfo (DER). Admission follows the family contract (see rsa) plus the window above.

Source

fn import_encryption_key_jwk( accessor: &Accessor<T, Self>, variant: RsaVariant, jwk: String, ) -> impl Future<Output = Result<Result<Resource<EncryptionKey>, Error>>> + Send

Import a public key as an RSA public JWK (kty: "RSA", with n and e). An alg member, when present, must be the variant’s JOSE alg ("RSA-OAEP-256", "RSA-OAEP-384", or "RSA-OAEP-512"). See mac-key.export-key-jwk for the package-wide JWK contract.

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§