libtc
20160415
Threshold Cryptography functions library
|
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <arpa/inet.h>
#include "tc_internal.h"
Go to the source code of this file.
Macros | |
#define | _POSIX_C_SOURCE 200809L |
#define | SERIALIZE_VARIABLE(dst, x) do { memcpy((dst), &x, sizeof x); (dst) += sizeof x; } while(0) |
#define | SERIALIZE_BYTES(dst, bs) |
#define | DESERIALIZE_SHORT(dst, buf) |
#define | DESERIALIZE_BYTES(dst, buf) |
Functions | |
char * | tc_serialize_key_share (const key_share_t *ks) |
char * | tc_serialize_signature_share (const signature_share_t *ss) |
char * | tc_serialize_key_metainfo (const key_metainfo_t *kmi) |
key_share_t * | tc_deserialize_key_share (const char *b64) |
signature_share_t * | tc_deserialize_signature_share (const char *b64) |
key_metainfo_t * | tc_deserialize_key_metainfo (const char *b64) |
#define _POSIX_C_SOURCE 200809L |
Definition at line 1 of file structs_serialization.c.
#define DESERIALIZE_BYTES | ( | dst, | |
buf | |||
) |
Definition at line 146 of file structs_serialization.c.
#define DESERIALIZE_SHORT | ( | dst, | |
buf | |||
) |
Definition at line 139 of file structs_serialization.c.
#define SERIALIZE_BYTES | ( | dst, | |
bs | |||
) |
Definition at line 12 of file structs_serialization.c.
#define SERIALIZE_VARIABLE | ( | dst, | |
x | |||
) | do { memcpy((dst), &x, sizeof x); (dst) += sizeof x; } while(0) |
Definition at line 10 of file structs_serialization.c.
key_metainfo_t* tc_deserialize_key_metainfo | ( | const char * | b64 | ) |
Deserializes a key share from a C string in the Base64 format
Definition at line 208 of file structs_serialization.c.
key_share_t* tc_deserialize_key_share | ( | const char * | b64 | ) |
Deserializes a key share from a C string in the Base64 format
Definition at line 159 of file structs_serialization.c.
signature_share_t* tc_deserialize_signature_share | ( | const char * | b64 | ) |
Deserializes a signature share from a C string in the Base64 format
Definition at line 183 of file structs_serialization.c.
char* tc_serialize_key_metainfo | ( | const key_metainfo_t * | kmi | ) |
Serializes a key shares array metainfo as a C string in the Base64 format
Definition at line 86 of file structs_serialization.c.
char* tc_serialize_key_share | ( | const key_share_t * | ks | ) |
Serializes a key share as a C string in the Base64 format
Definition at line 21 of file structs_serialization.c.
char* tc_serialize_signature_share | ( | const signature_share_t * | ss | ) |
Serializes a signature share as a C string in the Base64 format
Definition at line 51 of file structs_serialization.c.