diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-06-27 17:12:26 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-06-27 17:12:26 +0200 |
commit | 0e026f8ac794a70012d36e662a0b54ad0888d890 (patch) | |
tree | 0c905dc768cea33dd3cd416398c00f489af953e9 /openpgp-ffi/include | |
parent | 9ce35cc2c757fae1338a356354608cf1d6fa563f (diff) |
openpgp: Rework secret key handling.
- Introduce two new types, `Encrypted` and `Unencrypted`, to make
the fields of enum `SecretKey` private. Add accessors, implement
From<..> to make the new types ergonomic to use, update callsites.
Diffstat (limited to 'openpgp-ffi/include')
-rw-r--r-- | openpgp-ffi/include/sequoia/openpgp/crypto.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp-ffi/include/sequoia/openpgp/crypto.h b/openpgp-ffi/include/sequoia/openpgp/crypto.h index 44e035dc..9a3c3964 100644 --- a/openpgp-ffi/include/sequoia/openpgp/crypto.h +++ b/openpgp-ffi/include/sequoia/openpgp/crypto.h @@ -61,7 +61,7 @@ pgp_password_t pgp_password_clone (pgp_password_t password); /*/ int pgp_password_equal (const pgp_password_t a, const pgp_password_t b); -typedef struct pgp_mpis_secret_key *pgp_mpis_secret_key_t; +typedef struct pgp_key_unencrypted *pgp_key_unencrypted_t; /*/ /// Creates a signature. @@ -89,7 +89,7 @@ typedef struct pgp_key_pair *pgp_key_pair_t; /*/ /// Creates a new key pair. /*/ -void pgp_key_pair_new (pgp_key_t pub, pgp_mpis_secret_key_t secret); +void pgp_key_pair_new (pgp_key_t pub, pgp_key_unencrypted_t secret); /*/ /// Frees a key pair. |