21 #ifndef PT_API_VERSION 22 #define PT_API_VERSION 2 24 #if PT_API_VERSION != 2 25 #error "Including mixed versions of Protocol API" 28 #ifndef PT_CRYPTO_API_H_ 29 #define PT_CRYPTO_API_H_ 51 typedef void (*
pt_crypto_success_handler)(
const connection_id_t connection_id,
const uint8_t *data,
const size_t size,
void *userdata);
134 const char *private_key_name,
135 const char *hash_digest,
136 const size_t hash_digest_size,
156 const char *public_key_name,
157 const char *hash_digest,
158 const size_t hash_digest_size,
159 const char *signature,
160 const size_t signature_size,
178 const char *private_key_name,
179 const char *peer_public_key,
180 const size_t peer_public_key_size,
void(* pt_crypto_get_item_failure_handler)(const connection_id_t connection_id, void *userdata)
Type definition for pt_crypto_get_item_failure_handler response failure handler.
Definition: pt_crypto_api.h:71
pt_status_t pt_crypto_asymmetric_verify(const connection_id_t connection_id, const char *public_key_name, const char *hash_digest, const size_t hash_digest_size, const char *signature, const size_t signature_size, pt_crypto_success_handler success_handler, pt_crypto_failure_handler failure_handler, void *userdata)
Perform asymmetric verify operation on given signature and hash digest using public key stored in sec...
pt_crypto_success_handler pt_crypto_get_item_success_handler
Type definition for pt_crypto_get_item_success_handler response success handler.
Definition: pt_crypto_api.h:64
Contains common structures and definitions for the protocol translator client.
pt_status_t pt_crypto_get_certificate(const connection_id_t connection_id, const char *name, pt_crypto_get_item_success_handler success_handler, pt_crypto_get_item_failure_handler failure_handler, void *userdata)
Retrieve a certificate from secure storage.
pt_status_t pt_crypto_asymmetric_sign(const connection_id_t connection_id, const char *private_key_name, const char *hash_digest, const size_t hash_digest_size, pt_crypto_success_handler success_handler, pt_crypto_failure_handler failure_handler, void *userdata)
Perform asymmetric sign operation using given hash digest and private key stored in secure storage on...
void(* pt_crypto_success_handler)(const connection_id_t connection_id, const uint8_t *data, const size_t size, void *userdata)
Type definition for a generic success handler returning a single buffer.
Definition: pt_crypto_api.h:51
pt_status_t pt_crypto_generate_random(const connection_id_t connection_id, const size_t size, pt_crypto_success_handler success_handler, pt_crypto_failure_handler failure_handler, void *userdata)
Generate and retrieve a random buffer from Device Management Edge.
pt_status_t pt_crypto_get_public_key(const connection_id_t connection_id, const char *name, pt_crypto_get_item_success_handler success_handler, pt_crypto_get_item_failure_handler failure_handler, void *userdata)
Retrieve a public key from secure storage.
pt_status_t pt_crypto_ecdh_key_agreement(const connection_id_t connection_id, const char *private_key_name, const char *peer_public_key, const size_t peer_public_key_size, pt_crypto_success_handler success_handler, pt_crypto_failure_handler failure_handler, void *userdata)
Perform ECDH key agreement using given peer public key and a private key stored in secure storage on ...
void(* pt_crypto_failure_handler)(const connection_id_t connection_id, int error_code, void *userdata)
Type definition for a generic failure response handler.
Definition: pt_crypto_api.h:59