Function caprock_key_extract_public

Function Documentation

caprock_error_t caprock_key_extract_public(caprock_key **pubkey, caprock_key_pair const *pair)

Extract a public key from a key pair. Note that extracting the private key is not typically necessary, so we will skip that function.

Parameters
  • pubkey[out] The structure into which to extract a public key; it will be allocated by this function.

  • pair[in] The key pair to extract the key from.

Return values
  • CAPROCK_ERR_SUCCESS – On success.

  • CAPROCK_ERR_INVALID_VALUE – If any of the inputs are invalid.