pub enum SuiteHint {
Aes128Gcm,
Aes256Gcm,
HmacSha256,
}Expand description
Crypto-suite hint for the policy decision.
SuiteHint is a wish of the policy engine — the crypto
plugin may ignore it if it does not support the
algorithm. The concrete Suite enum (security-crypto)
is the plugin-internal type; this indirection allows future
suites (ChaCha20-Poly1305, AES-CCM) without a breaking change to the
policy API.
Variants§
Aes128Gcm
AES-128-GCM — default suite v1.4.
Aes256Gcm
AES-256-GCM — for long-term confidentiality / compliance.
HmacSha256
HMAC-SHA256 auth-only (no confidentiality, SIGN level).
Implementations§
Source§impl SuiteHint
impl SuiteHint
Sourcepub fn from_suite(suite: Suite) -> Self
pub fn from_suite(suite: Suite) -> Self
Reverse mapping from Suite.
Sourcepub fn protection_level(self) -> ProtectionLevel
pub fn protection_level(self) -> ProtectionLevel
Returns the natural protection level of this suite:
AEAD suites → Encrypt, HMAC → Sign.
Trait Implementations§
impl Copy for SuiteHint
impl Eq for SuiteHint
impl StructuralPartialEq for SuiteHint
Auto Trait Implementations§
impl Freeze for SuiteHint
impl RefUnwindSafe for SuiteHint
impl Send for SuiteHint
impl Sync for SuiteHint
impl Unpin for SuiteHint
impl UnsafeUnpin for SuiteHint
impl UnwindSafe for SuiteHint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more