pv: Implement Display for SymKey based on key_type()

Add a Display implementation for SymKey that formats values as
`SymKey(<type>)`, delegating to key_type(). This provides a clearer
and stable human-readable representation for logs and CLI output.

Reviewed-by: Marc Hartmayer <marc@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Timo Keller <tkeller@linux.ibm.com
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Timo Keller
2026-06-18 14:10:59 +02:00
committed by Jan Höppner
parent c3e61e5e0f
commit d82beef937

View File

@@ -162,6 +162,12 @@ impl SymKey {
}
}
impl Display for SymKey {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SymKey({:?})", self.key_type())
}
}
/// Performs an hkdf according to RFC 5869.
/// See [`OpenSSL HKDF`]()
///