flux-cipher

flux-cipher —

Synopsis




#define     FLUX_CIPHER                     (cip)
struct      FluxCipher;
FluxCipher* flux_cipher_new                 (void);
FluxCipher* flux_cipher_dup                 (FluxCipher *old);
void        flux_cipher_finalize            (FluxObject *cip);
void        flux_cipher_generate            (FluxCipher *cip);
void        flux_cipher_export_invitation   (FluxCipher *cip,
                                             guchar **out,
                                             guint *len);
gboolean    flux_cipher_import_invitation   (FluxCipher *cip,
                                             const guchar *in,
                                             guint len);
void        flux_cipher_export_confirmation (FluxCipher *cip,
                                             guchar **out,
                                             guint *len);
gboolean    flux_cipher_import_confirmation (FluxCipher *cip,
                                             const guchar *in,
                                             guint len);
void        flux_cipher_encrypt_buffer      (FluxCipher *cip,
                                             guchar *buf,
                                             guint len);
void        flux_cipher_decrypt_buffer      (FluxCipher *cip,
                                             guchar *buf,
                                             guint len);
void        flux_cipher_encrypt_buffer_copy (FluxCipher *cip,
                                             guchar *out,
                                             const guchar *in,
                                             guint len);
void        flux_cipher_decrypt_buffer_copy (FluxCipher *cip,
                                             guchar *out,
                                             const guchar *in,
                                             guint len);
gboolean    flux_cipher_is_ready            (FluxCipher *cip);

Description

Details

FLUX_CIPHER()

#define FLUX_CIPHER(cip)  ((FluxCipher *) cip)

cip :

struct FluxCipher

struct FluxCipher {

  FluxObject object;

  guint got_invitation    : 1,
        sent_confirmation : 1,
        got_confirmation  : 1;

  FluxObject *sym_key_encrypt;    /* Symmetric key used to encrypt this session */
  FluxObject *sym_key_decrypt;    /* Symmetric key used to decrypt this session */

  FluxObject *asym_key_encrypt;   /* Asymmetric key used to encrypt (her public) */
  FluxObject *asym_key_decrypt;   /* Asymmetric key used to decrypt (my secret) */

  FluxObject *asym_key_sign;      /* Asymmetric key used to sign (my secret) */
  FluxObject *asym_key_verify;    /* Asymmetric key used to verify (her public) */
};


flux_cipher_new ()

FluxCipher* flux_cipher_new                 (void);

Returns :

flux_cipher_dup ()

FluxCipher* flux_cipher_dup                 (FluxCipher *old);

old :
Returns :

flux_cipher_finalize ()

void        flux_cipher_finalize            (FluxObject *cip);

cip :

flux_cipher_generate ()

void        flux_cipher_generate            (FluxCipher *cip);

cip :

flux_cipher_export_invitation ()

void        flux_cipher_export_invitation   (FluxCipher *cip,
                                             guchar **out,
                                             guint *len);

cip :
out :
len :

flux_cipher_import_invitation ()

gboolean    flux_cipher_import_invitation   (FluxCipher *cip,
                                             const guchar *in,
                                             guint len);

cip :
in :
len :
Returns :

flux_cipher_export_confirmation ()

void        flux_cipher_export_confirmation (FluxCipher *cip,
                                             guchar **out,
                                             guint *len);

cip :
out :
len :

flux_cipher_import_confirmation ()

gboolean    flux_cipher_import_confirmation (FluxCipher *cip,
                                             const guchar *in,
                                             guint len);

cip :
in :
len :
Returns :

flux_cipher_encrypt_buffer ()

void        flux_cipher_encrypt_buffer      (FluxCipher *cip,
                                             guchar *buf,
                                             guint len);

cip :
buf :
len :

flux_cipher_decrypt_buffer ()

void        flux_cipher_decrypt_buffer      (FluxCipher *cip,
                                             guchar *buf,
                                             guint len);

cip :
buf :
len :

flux_cipher_encrypt_buffer_copy ()

void        flux_cipher_encrypt_buffer_copy (FluxCipher *cip,
                                             guchar *out,
                                             const guchar *in,
                                             guint len);

cip :
out :
in :
len :

flux_cipher_decrypt_buffer_copy ()

void        flux_cipher_decrypt_buffer_copy (FluxCipher *cip,
                                             guchar *out,
                                             const guchar *in,
                                             guint len);

cip :
out :
in :
len :

flux_cipher_is_ready ()

gboolean    flux_cipher_is_ready            (FluxCipher *cip);

cip :
Returns :