81 uint8_t **sig,
size_t *sig_len);
84 size_t input_num, uint8_t *sig,
size_t sig_len);
87 const uint8_t *iv,
size_t iv_len, uint8_t **output,
size_t *output_len);
90 const uint8_t *iv,
size_t iv_len, uint8_t **output,
size_t *output_len);
108 LCB_DEPRECATED2(
const char *kid,
109 "Do not use kid field. Encryption keys have to be part of the provider implementation");
201#define LCBCRYPTO_DEFAULT_FIELD_PREFIX "__crypt_"
lcbcrypto_FIELDSPEC * fields
list of field specs
Definition crypto.h:125
char * out
pointer to output JSON document.
Definition crypto.h:123
size_t ndoc
size of the input JSON document
Definition crypto.h:122
const char * doc
pointer to the input JSON document
Definition crypto.h:121
const uint8_t * data
pointer to data
Definition crypto.h:52
const char * prefix
prefix to encrypted field.
Definition crypto.h:120
void * cookie
opaque pointer (e.g.
Definition crypto.h:71
size_t len
length of the data in bytes
Definition crypto.h:53
uint64_t flags
provider-specific flags
Definition crypto.h:70
void(* destructor)(struct lcbcrypto_PROVIDER *provider)
destructor function, or NULL
Definition crypto.h:72
const char * name
field name (NUL-terminated)
Definition crypto.h:106
uint16_t version
version of the structure, current value is 1
Definition crypto.h:68
int16_t _refcnt
reference counter
Definition crypto.h:69
size_t nout
size of the output JSON document
Definition crypto.h:124
const char * alg
crypto provider alias (NUL-terminated)
Definition crypto.h:107
size_t nfields
number of field specs
Definition crypto.h:126
lcb_STATUS lcbcrypto_encrypt_fields(lcb_INSTANCE *instance, lcbcrypto_CMDENCRYPT *cmd)
Encrypt all specified fields in the JSON encoded object.
void lcbcrypto_unref(lcbcrypto_PROVIDER *provider)
Decrement reference counter for crypto-provider.
void lcbcrypto_unregister(lcb_INSTANCE *instance, const char *name)
Unregister crypto-provider for specified alias.
lcb_STATUS lcbcrypto_decrypt_fields(lcb_INSTANCE *instance, lcbcrypto_CMDDECRYPT *cmd)
Decrypt all specified fields in the JSON encoded object.
void lcbcrypto_register(lcb_INSTANCE *instance, const char *name, lcbcrypto_PROVIDER *provider)
Register crypto-provider for specified alias.
void lcbcrypto_ref(lcbcrypto_PROVIDER *provider)
Increment reference counter for crypto-provider.
Command to decrypt JSON fields.
Definition crypto.h:135
Command to encrypt JSON fields.
Definition crypto.h:118
Structure for JSON field specification for encrypt/decrypt API.
Definition crypto.h:105
Crypto-provider interface.
Definition crypto.h:67
IOV-style structure for signing functions of crypto-provider.
Definition crypto.h:51
lcb_STATUS
Error codes returned by the library.
Definition error.h:213
struct lcb_st lcb_INSTANCE
Library handle representing a connection to a cluster and its data buckets.
Definition couchbase.h:35