Misc PGP helper routines. More...
Go to the source code of this file.
Data Structures | |
struct | PgpUid |
PGP User ID. More... | |
struct | PgpKeyInfo |
Information about a PGP key. More... | |
Functions | |
const char * | pgp_pkalgbytype (unsigned char type) |
Get the name of the algorithm from its ID. | |
struct PgpUid * | pgp_copy_uids (struct PgpUid *up, struct PgpKeyInfo *parent) |
Copy a list of PGP UIDs. | |
bool | pgp_canencrypt (unsigned char type) |
Does this algorithm ID support encryption? | |
bool | pgp_cansign (unsigned char type) |
Does this algorithm ID support signing? | |
void | pgp_key_free (struct PgpKeyInfo **kpp) |
Free a PGP key info. | |
struct PgpKeyInfo * | pgp_remove_key (struct PgpKeyInfo **klist, struct PgpKeyInfo *key) |
Remove a PGP key from a list. | |
struct PgpKeyInfo * | pgp_keyinfo_new (void) |
Misc PGP helper routines.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file pgplib.h.
const char * pgp_pkalgbytype | ( | unsigned char | type | ) |
Get the name of the algorithm from its ID.
type | Algorithm ID |
ptr | Algorithm name |
Definition at line 41 of file pgplib.c.
struct PgpUid * pgp_copy_uids | ( | struct PgpUid * | up, |
struct PgpKeyInfo * | parent | ||
) |
Copy a list of PGP UIDs.
up | List of PGP UIDs |
parent | Parent PGP key |
ptr | New list of PGP UIDs |
Definition at line 126 of file pgplib.c.
bool pgp_canencrypt | ( | unsigned char | type | ) |
bool pgp_cansign | ( | unsigned char | type | ) |
void pgp_key_free | ( | struct PgpKeyInfo ** | kpp | ) |
Free a PGP key info.
[out] | kpp | PGP key info to free |
Definition at line 200 of file pgplib.c.
struct PgpKeyInfo * pgp_remove_key | ( | struct PgpKeyInfo ** | klist, |
struct PgpKeyInfo * | key | ||
) |
Remove a PGP key from a list.
[out] | klist | List of PGP Keys |
[in] | key | Key to remove |
ptr | Updated list of PGP Keys |
Definition at line 168 of file pgplib.c.
struct PgpKeyInfo * pgp_keyinfo_new | ( | void | ) |