[pbs-devel] [PATCH proxmox-backup] fingerprint: add bytes() accessor

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Nov 24 14:05:19 CET 2020


needed for libproxmox-backup-qemu0

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 src/backup/crypt_config.rs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/backup/crypt_config.rs b/src/backup/crypt_config.rs
index 7d27706a..67482a75 100644
--- a/src/backup/crypt_config.rs
+++ b/src/backup/crypt_config.rs
@@ -47,6 +47,12 @@ pub struct Fingerprint {
     bytes: [u8; 32],
 }
 
+impl Fingerprint {
+    pub fn bytes(&self) -> &[u8; 32] {
+        &self.bytes
+    }
+}
+
 /// Display as short key ID
 impl Display for Fingerprint {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-- 
2.20.1






More information about the pbs-devel mailing list