pub trait HostDecryptionKeyWithStore<T>: HasData + Send {
// Required methods
fn drop(
accessor: &Accessor<T, Self>,
rep: Resource<DecryptionKey>,
) -> impl Future<Output = Result<()>> + Send
where Self: Sized;
fn decrypt(
accessor: &Accessor<T, Self>,
self_: Resource<DecryptionKey>,
label: Option<Vec<u8>>,
ciphertext: Vec<u8>,
) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send;
fn unwrap(
accessor: &Accessor<T, Self>,
self_: Resource<DecryptionKey>,
label: Option<Vec<u8>>,
ciphertext: Vec<u8>,
) -> impl Future<Output = Result<Result<Resource<UnwrapInput>, Error>>> + Send;
fn export_key_jwk(
accessor: &Accessor<T, Self>,
self_: Resource<DecryptionKey>,
) -> impl Future<Output = Result<Result<String, Error>>> + Send;
fn export_key_pkcs8(
accessor: &Accessor<T, Self>,
self_: Resource<DecryptionKey>,
) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send;
fn to_wrap_input_jwk(
accessor: &Accessor<T, Self>,
self_: Resource<DecryptionKey>,
) -> impl Future<Output = Result<Result<Resource<WrapInput>, Error>>> + Send;
fn to_wrap_input_pkcs8(
accessor: &Accessor<T, Self>,
self_: Resource<DecryptionKey>,
) -> impl Future<Output = Result<Result<Resource<WrapInput>, Error>>> + Send;
}Required Methods§
fn drop(
accessor: &Accessor<T, Self>,
rep: Resource<DecryptionKey>,
) -> impl Future<Output = Result<()>> + Sendwhere
Self: Sized,
Sourcefn decrypt(
accessor: &Accessor<T, Self>,
self_: Resource<DecryptionKey>,
label: Option<Vec<u8>>,
ciphertext: Vec<u8>,
) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send
fn decrypt( accessor: &Accessor<T, Self>, self_: Resource<DecryptionKey>, label: Option<Vec<u8>>, ciphertext: Vec<u8>, ) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send
Decrypt a ciphertext produced by the matching public key
under the same label. Fails error.not-permitted without
the can-decrypt grant; every decryption failure is the one
detail-free error.authentication-failed (see the interface
doc).
Sourcefn unwrap(
accessor: &Accessor<T, Self>,
self_: Resource<DecryptionKey>,
label: Option<Vec<u8>>,
ciphertext: Vec<u8>,
) -> impl Future<Output = Result<Result<Resource<UnwrapInput>, Error>>> + Send
fn unwrap( accessor: &Accessor<T, Self>, self_: Resource<DecryptionKey>, label: Option<Vec<u8>>, ciphertext: Vec<u8>, ) -> impl Future<Output = Result<Result<Resource<UnwrapInput>, Error>>> + Send
Decrypt a wrapped key into an unwrap-input for a typed
unwrap mint (see the wrapping interface): the material
never reaches the caller. Fails error.not-permitted without
the can-unwrap grant; failures are otherwise as decrypt.
Sourcefn export_key_jwk(
accessor: &Accessor<T, Self>,
self_: Resource<DecryptionKey>,
) -> impl Future<Output = Result<Result<String, Error>>> + Send
fn export_key_jwk( accessor: &Accessor<T, Self>, self_: Resource<DecryptionKey>, ) -> impl Future<Output = Result<Result<String, Error>>> + Send
The private key as a JWK, behind the extractability gate and
fallible beyond it like every export (README.md,
“Extractability”).
Sourcefn export_key_pkcs8(
accessor: &Accessor<T, Self>,
self_: Resource<DecryptionKey>,
) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send
fn export_key_pkcs8( accessor: &Accessor<T, Self>, self_: Resource<DecryptionKey>, ) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send
The private key as a PKCS#8 PrivateKeyInfo (DER), behind the same gate.
Sourcefn to_wrap_input_jwk(
accessor: &Accessor<T, Self>,
self_: Resource<DecryptionKey>,
) -> impl Future<Output = Result<Result<Resource<WrapInput>, Error>>> + Send
fn to_wrap_input_jwk( accessor: &Accessor<T, Self>, self_: Resource<DecryptionKey>, ) -> impl Future<Output = Result<Result<Resource<WrapInput>, Error>>> + Send
The private-key JWK serialization as a wrap-input, for
wrapping under another key. Behind the extractability gate.
Sourcefn to_wrap_input_pkcs8(
accessor: &Accessor<T, Self>,
self_: Resource<DecryptionKey>,
) -> impl Future<Output = Result<Result<Resource<WrapInput>, Error>>> + Send
fn to_wrap_input_pkcs8( accessor: &Accessor<T, Self>, self_: Resource<DecryptionKey>, ) -> 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.