![]() |
Diffusion C API 6.12.0
|
Functions handling authorisation, security and user credentials. More...
Functions | |
| CREDENTIALS_T * | credentials_create_none (void) |
| Create an empty set of credentials. | |
| CREDENTIALS_T * | credentials_create_password (const char *password) |
| Create credentials for a given password. | |
| CREDENTIALS_T * | credentials_create_custom (const char *data, const unsigned long len) |
| Create custom credentials, where the caller provides an opaque set of bytes. | |
| void | credentials_free (CREDENTIALS_T *creds) |
| Free a credentials structure. | |
| char * | buf_read_credentials (const char *data, CREDENTIALS_T **credentials) |
| Deserialise credentials from a stream of wire format data. | |
| CREDENTIALS_T * | credentials_unmarshal (const BUF_T *buf) |
| Deserialise a credentials structure from a wire format BUF_T. | |
| BUF_T * | credentials_marshal (const CREDENTIALS_T *credentials) |
| Serialise a credentials structure to wire format. | |
Functions handling authorisation, security and user credentials.
| char * buf_read_credentials | ( | const char * | data, |
| CREDENTIALS_T ** | credentials ) |
Deserialise credentials from a stream of wire format data.
| data | Pointer the the start of a serialised credentials structure in a char array. |
| credentials | A created credentials structure. |
| CREDENTIALS_T * credentials_create_custom | ( | const char * | data, |
| const unsigned long | len ) |
Create custom credentials, where the caller provides an opaque set of bytes.
credentials_free should be called on the pointer when no longer needed.
| data | An array of bytes representing the credentials. |
| len | The length of the array. |
| CREDENTIALS_T * | Credentials with a type of "CUSTOM". |
| NULL | If an error occurs. |
| CREDENTIALS_T * credentials_create_none | ( | void | ) |
Create an empty set of credentials.
credentials_free should be called on the pointer when no longer needed.
| CREDENTIALS_T * | Credentials with a type of "NONE". |
| NULL | If an error occurs. |
| CREDENTIALS_T * credentials_create_password | ( | const char * | password | ) |
Create credentials for a given password.
credentials_free should be called on the pointer when no longer needed.
| password | The password to encode into the credentials. |
| CREDENTIALS_T * | Credentials with a type of "PLAIN_PASSWORD". |
| NULL | If an error occurs. |
| void credentials_free | ( | CREDENTIALS_T * | creds | ) |
Free a credentials structure.
It is the responsibility of the caller to free any memory associated with the credentials data (either a password or custom data).
| creds | A set of credentials. |
| BUF_T * credentials_marshal | ( | const CREDENTIALS_T * | credentials | ) |
Serialise a credentials structure to wire format.
| credentials | A credentials structure to be serialised. |
| BUF_T * | A buffer with the credentials in wire format. |
| NULL | If an error occurs. |
| CREDENTIALS_T * credentials_unmarshal | ( | const BUF_T * | buf | ) |
Deserialise a credentials structure from a wire format BUF_T.
| buf | The buffer containing the serialised credentials. |
| CREDENTIALS_T * | A credentials structure. |
| NULL | If an error occurs. |