mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
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:
@@ -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`]()
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user