librnp - OpenPGP implementation, available via FFI interface.
librnp is part of the RNP suite and forms the basis for the rnp(1) and rnpkeys(1) command-line utilities.
It provides an FFI interface to functions required for operations needed by the OpenPGP protocol.
Interface to the library is exposed via <rnp/rnp.h> and <rnp/rnp_err.h> headers. You will also need to link to librnp.
Please see its headers for the full function list and detailed documentation.
A number of examples are provided in src/examples folder of the RNP suite source tree.
Demonstrates generation of an OpenPGP keypair using the JSON key description mechanism. May be used to generate any custom key types that are supported by the RNP suite.
Demonstrates how to build OpenPGP-encrypted messages. A message is encrypted with keys, generated via ./generate, with a hardcoded password.
Demonstrates how to decrypt OpenPGP messages. Running this example requires the ./encrypt example to be first run in order to produce the sample encrypted message for decryption.
Demonstrates how to sign OpenPGP messages. Running this example requires the ./generate example to be first run in order to generate and write out secret keys.
Demonstrates verify OpenPGP signed messages. Again, running this example requires the ./sign example to be first run in order to generate a signed OpenPGP message.
RNP is an open source project led by Ribose and has received contributions from numerous individuals and organizations.
Copyright (C) 2017-2021 Ribose. The RNP software suite is freely licensed: please refer to the LICENSE file for details.