◆ destroy_func
void(* signal_protocol_identity_key_store::destroy_func) (void *user_data) |
Function called to perform cleanup when the data store context is being destroyed.
◆ get_identity_key_pair
Get the local client's identity key pair.
- Parameters
-
public_data | pointer to a newly allocated buffer containing the public key, if found. Unset if no record was found. The Signal Protocol library is responsible for freeing this buffer. |
private_data | pointer to a newly allocated buffer containing the private key, if found. Unset if no record was found. The Signal Protocol library is responsible for freeing this buffer. |
- Returns
- 0 on success, negative on failure
◆ get_local_registration_id
int(* signal_protocol_identity_key_store::get_local_registration_id) (void *user_data, uint32_t *registration_id) |
Return the local client's registration ID.
Clients should maintain a registration ID, a random number between 1 and 16380 that's generated once at install time.
- Parameters
-
registration_id | pointer to be set to the local client's registration ID, if it was successfully retrieved. |
- Returns
- 0 on success, negative on failure
◆ is_trusted_identity
Verify a remote client's identity key.
Determine whether a remote client's identity is trusted. Convention is that the TextSecure protocol is 'trust on first use.' This means that an identity key is considered 'trusted' if there is no entry for the recipient in the local store, or if it matches the saved key for a recipient in the local store. Only if it mismatches an entry in the local store is it considered 'untrusted.'
- Parameters
-
address | the address of the remote client |
identityKey | The identity key to verify. |
key_data | Pointer to the identity key to verify |
key_len | Length of the identity key to verify |
- Returns
- 1 if trusted, 0 if untrusted, negative on failure
◆ save_identity
Save a remote client's identity key
Store a remote client's identity key as trusted. The value of key_data may be null. In this case remove the key data from the identity store, but retain any metadata that may be kept alongside it.
- Parameters
-
address | the address of the remote client |
key_data | Pointer to the remote client's identity key, may be null |
key_len | Length of the remote client's identity key |
- Returns
- 0 on success, negative on failure
◆ user_data
void* signal_protocol_identity_key_store::user_data |
The documentation for this struct was generated from the following file: