Skip to content

Commit

Permalink
Add function pgp_fingerprint_t::vec().
Browse files Browse the repository at this point in the history
  • Loading branch information
ni4 committed Dec 20, 2024
1 parent 299f28a commit 6ef4b14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/lib/fingerprint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,9 @@ pgp_fingerprint_t::keyid() const
}
return res;
}

std::vector<uint8_t>
pgp_fingerprint_t::vec() const
{
return std::vector<uint8_t>(fingerprint, fingerprint + length);
}
3 changes: 2 additions & 1 deletion src/lib/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ typedef struct pgp_fingerprint_t {
(size == PGP_FINGERPRINT_V5_SIZE);
}

pgp_key_id_t keyid() const;
pgp_key_id_t keyid() const;
std::vector<uint8_t> vec() const;
} pgp_fingerprint_t;

typedef std::array<uint8_t, PGP_KEY_GRIP_SIZE> pgp_sig_id_t;
Expand Down

0 comments on commit 6ef4b14

Please sign in to comment.