#include <glib.h>
Include dependency graph for cipher.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | _PurpleCipherOps |
The operations of a cipher. More... | |
PurpleCipher API | |
const gchar * | purple_cipher_get_name (PurpleCipher *cipher) |
Gets a cipher's name. | |
guint | purple_cipher_get_capabilities (PurpleCipher *cipher) |
Gets a cipher's capabilities. | |
gboolean | purple_cipher_digest_region (const gchar *name, const guchar *data, size_t data_len, size_t in_len, guchar digest[], size_t *out_len) |
Gets a digest from a cipher. | |
PurpleCiphers API | |
PurpleCipher * | purple_ciphers_find_cipher (const gchar *name) |
Finds a cipher by it's name. | |
PurpleCipher * | purple_ciphers_register_cipher (const gchar *name, PurpleCipherOps *ops) |
Registers a cipher as a usable cipher. | |
gboolean | purple_ciphers_unregister_cipher (PurpleCipher *cipher) |
Unregisters a cipher. | |
GList * | purple_ciphers_get_ciphers (void) |
Gets the list of ciphers. | |
PurpleCipher Subsystem API | |
gpointer | purple_ciphers_get_handle (void) |
Gets the handle to the cipher subsystem. | |
void | purple_ciphers_init (void) |
Initializes the cipher core. | |
void | purple_ciphers_uninit (void) |
Uninitializes the cipher core. | |
PurpleCipherContext API | |
void | purple_cipher_context_set_option (PurpleCipherContext *context, const gchar *name, gpointer value) |
Sets the value an option on a cipher context. | |
gpointer | purple_cipher_context_get_option (PurpleCipherContext *context, const gchar *name) |
Gets the vale of an option on a cipher context. | |
PurpleCipherContext * | purple_cipher_context_new (PurpleCipher *cipher, void *extra) |
Creates a new cipher context and initializes it. | |
PurpleCipherContext * | purple_cipher_context_new_by_name (const gchar *name, void *extra) |
Creates a new cipher context by the cipher name and initializes it. | |
void | purple_cipher_context_reset (PurpleCipherContext *context, gpointer extra) |
Resets a cipher context to it's default value. | |
void | purple_cipher_context_destroy (PurpleCipherContext *context) |
Destorys a cipher context and deinitializes it. | |
void | purple_cipher_context_set_iv (PurpleCipherContext *context, guchar *iv, size_t len) |
Sets the initialization vector for a context. | |
void | purple_cipher_context_append (PurpleCipherContext *context, const guchar *data, size_t len) |
Appends data to the context. | |
gboolean | purple_cipher_context_digest (PurpleCipherContext *context, size_t in_len, guchar digest[], size_t *out_len) |
Digests a context. | |
gboolean | purple_cipher_context_digest_to_str (PurpleCipherContext *context, size_t in_len, gchar digest_s[], size_t *out_len) |
Converts a guchar digest into a hex string. | |
gint | purple_cipher_context_encrypt (PurpleCipherContext *context, const guchar data[], size_t len, guchar output[], size_t *outlen) |
Encrypts data using the context. | |
gint | purple_cipher_context_decrypt (PurpleCipherContext *context, const guchar data[], size_t len, guchar output[], size_t *outlen) |
Decrypts data using the context. | |
void | purple_cipher_context_set_salt (PurpleCipherContext *context, guchar *salt) |
Sets the salt on a context. | |
size_t | purple_cipher_context_get_salt_size (PurpleCipherContext *context) |
Gets the size of the salt if the cipher supports it. | |
void | purple_cipher_context_set_key (PurpleCipherContext *context, const guchar *key) |
Sets the key on a context. | |
size_t | purple_cipher_context_get_key_size (PurpleCipherContext *context) |
Gets the key size for a context. | |
void | purple_cipher_context_set_batch_mode (PurpleCipherContext *context, PurpleCipherBatchMode mode) |
Sets the batch mode of a context. | |
PurpleCipherBatchMode | purple_cipher_context_get_batch_mode (PurpleCipherContext *context) |
Gets the batch mode of a context. | |
size_t | purple_cipher_context_get_block_size (PurpleCipherContext *context) |
Gets the block size of a context. | |
void | purple_cipher_context_set_key_with_len (PurpleCipherContext *context, const guchar *key, size_t len) |
Sets the key with a given length on a context. | |
void | purple_cipher_context_set_data (PurpleCipherContext *context, gpointer data) |
Sets the cipher data for a context. | |
gpointer | purple_cipher_context_get_data (PurpleCipherContext *context) |
Gets the cipher data for a context. | |
Purple Cipher HTTP Digest Helper Functions | |
gchar * | purple_cipher_http_digest_calculate_session_key (const gchar *algorithm, const gchar *username, const gchar *realm, const gchar *password, const gchar *nonce, const gchar *client_nonce) |
Calculates a session key for HTTP Digest authentation. | |
gchar * | purple_cipher_http_digest_calculate_response (const gchar *algorithm, const gchar *method, const gchar *digest_uri, const gchar *qop, const gchar *entity, const gchar *nonce, const gchar *nonce_count, const gchar *client_nonce, const gchar *session_key) |
Calculate a response for HTTP Digest authentication. | |
Defines | |
#define | PURPLE_CIPHER(obj) ((PurpleCipher *)(obj)) |
PurpleCipher typecast helper. | |
#define | PURPLE_CIPHER_OPS(obj) ((PurpleCipherOps *)(obj)) |
PurpleCipherInfo typecase helper. | |
#define | PURPLE_CIPHER_CONTEXT(obj) ((PurpleCipherContext *)(obj)) |
PurpleCipherContext typecast helper. | |
Typedefs | |
typedef _PurpleCipher | PurpleCipher |
A handle to a PurpleCipher. | |
typedef _PurpleCipherOps | PurpleCipherOps |
Ops for a PurpleCipher. | |
typedef _PurpleCipherContext | PurpleCipherContext |
A context for a PurpleCipher. | |
typedef enum _PurpleCipherBatchMode | PurpleCipherBatchMode |
Modes for batch encrypters. | |
typedef enum _PurpleCipherCaps | PurpleCipherCaps |
The operation flags for a cipher. | |
Enumerations | |
enum | _PurpleCipherBatchMode { PURPLE_CIPHER_BATCH_MODE_ECB, PURPLE_CIPHER_BATCH_MODE_CBC } |
Modes for batch encrypters. | |
enum | _PurpleCipherCaps { PURPLE_CIPHER_CAPS_SET_OPT = 1 << 1, PURPLE_CIPHER_CAPS_GET_OPT = 1 << 2, PURPLE_CIPHER_CAPS_INIT = 1 << 3, PURPLE_CIPHER_CAPS_RESET = 1 << 4, PURPLE_CIPHER_CAPS_UNINIT = 1 << 5, PURPLE_CIPHER_CAPS_SET_IV = 1 << 6, PURPLE_CIPHER_CAPS_APPEND = 1 << 7, PURPLE_CIPHER_CAPS_DIGEST = 1 << 8, PURPLE_CIPHER_CAPS_ENCRYPT = 1 << 9, PURPLE_CIPHER_CAPS_DECRYPT = 1 << 10, PURPLE_CIPHER_CAPS_SET_SALT = 1 << 11, PURPLE_CIPHER_CAPS_GET_SALT_SIZE = 1 << 12, PURPLE_CIPHER_CAPS_SET_KEY = 1 << 13, PURPLE_CIPHER_CAPS_GET_KEY_SIZE = 1 << 14, PURPLE_CIPHER_CAPS_SET_BATCH_MODE = 1 << 15, PURPLE_CIPHER_CAPS_GET_BATCH_MODE = 1 << 16, PURPLE_CIPHER_CAPS_GET_BLOCK_SIZE = 1 << 17, PURPLE_CIPHER_CAPS_SET_KEY_WITH_LEN = 1 << 18, PURPLE_CIPHER_CAPS_UNKNOWN = 1 << 19 } |
The operation flags for a cipher. More... |
Definition in file cipher.h.
|
|
Appends data to the context.
|
|
Decrypts data using the context.
|
|
Destorys a cipher context and deinitializes it.
|
|
Digests a context.
|
|
Converts a guchar digest into a hex string.
|
|
Encrypts data using the context.
|
|
Gets the batch mode of a context.
|
|
Gets the block size of a context.
|
|
Gets the cipher data for a context.
|
|
Gets the key size for a context.
|
|
Gets the vale of an option on a cipher context.
|
|
Gets the size of the salt if the cipher supports it.
|
|
Creates a new cipher context and initializes it.
|
|
Creates a new cipher context by the cipher name and initializes it.
|
|
Resets a cipher context to it's default value.
|
|
Sets the batch mode of a context.
|
|
Sets the cipher data for a context.
|
|
Sets the initialization vector for a context.
|
|
Sets the key on a context.
|
|
Sets the key with a given length on a context.
|
|
Sets the value an option on a cipher context.
|
|
Sets the salt on a context.
|
|
Gets a digest from a cipher.
|
|
Gets a cipher's capabilities.
|
|
Gets a cipher's name.
|
|
Calculate a response for HTTP Digest authentication. See RFC 2617 for more information.
|
|
Calculates a session key for HTTP Digest authentation. See RFC 2617 for more information.
|
|
Finds a cipher by it's name.
|
|
Gets the list of ciphers.
|
|
Gets the handle to the cipher subsystem.
|
|
Registers a cipher as a usable cipher.
|
|
Unregisters a cipher.
|