pub struct RecoveredContentKey { /* private fields */ }Expand description
Secret candidate whose recovery validity is retained until content work ends. Debug output never exposes key bytes or padding validity.
Implementations§
Source§impl RecoveredContentKey
impl RecoveredContentKey
Sourcepub fn confirmed(bytes: Vec<u8>) -> Self
pub fn confirmed(bytes: Vec<u8>) -> Self
An explicitly supplied key, or one recovered by an integrity-checking
mechanism such as OAEP or key wrap. A KEM real-or-rejection secret also
has no separate recovery-validity result; authenticated content decides
acceptance, or policy explicitly delegates authentication to the caller.
This constructor itself proves neither ciphertext integrity nor identity.
Do not use this for RSA-v1.5 recovery, whose validity must be
retained separately with recovery until content work completes.
Sourcepub fn opaque(key: Arc<dyn ContentDecryptionKey>) -> Self
pub fn opaque(key: Arc<dyn ContentDecryptionKey>) -> Self
Retain a non-exportable content key until the content operation ends.
Sourcepub fn into_key(self) -> Result<Vec<u8>, ProviderError>
pub fn into_key(self) -> Result<Vec<u8>, ProviderError>
Consume a completed recovery outside a content operation. Content
operations must retain the candidate until after primitive decryption.
The returned allocation is caller-owned; the caller is responsible for
zeroizing it when no longer needed (for example with Zeroizing).