Flux Reference Manual |
---|
flux-cipher —
#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);
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) */ };
void flux_cipher_export_invitation (FluxCipher *cip, guchar **out, guint *len);
cip : | |
out : | |
len : |
gboolean flux_cipher_import_invitation (FluxCipher *cip, const guchar *in, guint len);
cip : | |
in : | |
len : | |
Returns : |
void flux_cipher_export_confirmation (FluxCipher *cip, guchar **out, guint *len);
cip : | |
out : | |
len : |
gboolean flux_cipher_import_confirmation (FluxCipher *cip, const guchar *in, guint len);
cip : | |
in : | |
len : | |
Returns : |
void flux_cipher_encrypt_buffer (FluxCipher *cip, guchar *buf, guint len);
cip : | |
buf : | |
len : |
void flux_cipher_decrypt_buffer (FluxCipher *cip, guchar *buf, guint len);
cip : | |
buf : | |
len : |
void flux_cipher_encrypt_buffer_copy (FluxCipher *cip, guchar *out, const guchar *in, guint len);
cip : | |
out : | |
in : | |
len : |
void flux_cipher_decrypt_buffer_copy (FluxCipher *cip, guchar *out, const guchar *in, guint len);
cip : | |
out : | |
in : | |
len : |
<< flux-rsa | Input/Output >> |