credential_to_handle_string()

Retrieve a string representation of credential handle.

Synopsis:

#include <sys/credential/credential_store.h>
 
int credential_to_handle_string(const credential_t *cred,
                                char **handle_str)

Since:

BlackBerry 10.3.1

Arguments:

cred

The credential to convert to a handle string.

handle_str

On return, a pointer to a string containing encoded credential handle. The string is ASCII encoded and null-terminated. You must call credential_util_free() to release this string when you're done using it.

Library:

libcredential (For the qcc command, use the -l bps option to link against this library)

Description:

This function retrieves a string representation of the of the credential handle. The handle string is returned in a newly allocated buffer.

This is a convenience function that encodes the result of credential_to_handle() into a null terminated string.

This function is more expensive than credential_to_handle() and should be used only if caller cannot process the credential handle as a buffer and needs a null-terminated string.

Returns:

0 if operation was successful, error code otherwise.