diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2021-03-02 11:27:44 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2021-03-02 11:54:11 +0100 |
commit | 43eab70f6a22b62ce0577e929e09f1d68cea80a8 (patch) | |
tree | cf3c1dc1a6e59f7b5c2531b8b7786181574738b5 /openpgp-ffi | |
parent | 18038d05d207ded98620d7ee0f7f3ca968642072 (diff) |
openpgp: Drop spaces from default string representation.
- Spaces in key ids and fingerprints make them awkward to copy and
pass as command line arguments. Change the default representation.
For the rare occasions that we expect users to manually verify
fingerprints, the previously introduced *::to_hex_pretty functions
can be used.
- Fixes #422.
Diffstat (limited to 'openpgp-ffi')
-rw-r--r-- | openpgp-ffi/src/fingerprint.rs | 2 | ||||
-rw-r--r-- | openpgp-ffi/src/keyid.rs | 4 | ||||
-rw-r--r-- | openpgp-ffi/src/lib.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/openpgp-ffi/src/fingerprint.rs b/openpgp-ffi/src/fingerprint.rs index 716d2d23..5d81b56c 100644 --- a/openpgp-ffi/src/fingerprint.rs +++ b/openpgp-ffi/src/fingerprint.rs @@ -61,7 +61,7 @@ fn pgp_fingerprint_from_bytes(buf: *const u8, /// /// char *pretty = pgp_fingerprint_to_string (fp); /// assert (strcmp (pretty, -/// "D2F2 C5D4 5BE9 FDE6 A4EE 0AAF 3185 5247 6038 31FD") == 0); +/// "D2F2C5D45BE9FDE6A4EE0AAF31855247603831FD") == 0); /// /// free (pretty); /// pgp_fingerprint_free (fp); diff --git a/openpgp-ffi/src/keyid.rs b/openpgp-ffi/src/keyid.rs index c5ed5dbe..1ad11207 100644 --- a/openpgp-ffi/src/keyid.rs +++ b/openpgp-ffi/src/keyid.rs @@ -48,7 +48,7 @@ pub struct KeyID(openpgp::KeyID); /// pgp_keyid_from_bytes ((uint8_t *) "\xbb\xbb\xbb\xbb\xbb\xbb\xbb\xbb"); /// /// char *mr_b_as_string = pgp_keyid_to_string (mr_b); -/// assert (strcmp (mr_b_as_string, "BBBB BBBB BBBB BBBB") == 0); +/// assert (strcmp (mr_b_as_string, "BBBBBBBBBBBBBBBB") == 0); /// /// pgp_keyid_free (mr_b); /// free (mr_b_as_string); @@ -73,7 +73,7 @@ fn pgp_keyid_from_bytes(id: *const u8) -> *mut KeyID { /// pgp_keyid_t mr_b = pgp_keyid_from_hex ("bbbbbbbbbbbbbbbb"); /// /// char *mr_b_as_string = pgp_keyid_to_string (mr_b); -/// assert (strcmp (mr_b_as_string, "BBBB BBBB BBBB BBBB") == 0); +/// assert (strcmp (mr_b_as_string, "BBBBBBBBBBBBBBBB") == 0); /// /// free (mr_b_as_string); /// pgp_keyid_free (mr_b); diff --git a/openpgp-ffi/src/lib.rs b/openpgp-ffi/src/lib.rs index e7957745..9072c636 100644 --- a/openpgp-ffi/src/lib.rs +++ b/openpgp-ffi/src/lib.rs @@ -187,7 +187,7 @@ //! //! char *pretty = pgp_fingerprint_to_string (fp); //! assert (strcmp (pretty, -//! "D2F2 C5D4 5BE9 FDE6 A4EE 0AAF 3185 5247 6038 31FD") == 0); +//! "D2F2C5D45BE9FDE6A4EE0AAF31855247603831FD") == 0); //! //! free (pretty); //! pgp_fingerprint_free (fp); |