fingerprint: add bytes() accessor

needed for libproxmox-backup-qemu0

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2020-11-24 14:05:19 +01:00 committed by Dietmar Maurer
parent 5176346b30
commit af9f72e9d8
1 changed files with 6 additions and 0 deletions

View File

@ -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 {