AWS Encryption SDK for C v2.4
|
#include <materials.h>
Data Fields | |
size_t | vt_size |
const char * | name |
void(* | destroy )(struct aws_cryptosdk_keyring *keyring) |
int(* | on_encrypt )(struct aws_cryptosdk_keyring *keyring, struct aws_allocator *request_alloc, struct aws_byte_buf *unencrypted_data_key, struct aws_array_list *keyring_trace, struct aws_array_list *edks, const struct aws_hash_table *enc_ctx, enum aws_cryptosdk_alg_id alg) |
int(* | on_decrypt )(struct aws_cryptosdk_keyring *keyring, struct aws_allocator *request_alloc, struct aws_byte_buf *unencrypted_data_key, struct aws_array_list *keyring_trace, const struct aws_array_list *edks, const struct aws_hash_table *enc_ctx, enum aws_cryptosdk_alg_id alg) |
Definition at line 516 of file materials.h.
void(* aws_cryptosdk_keyring_vt::destroy) (struct aws_cryptosdk_keyring *keyring) |
VIRTUAL FUNCTION: must implement unless it is a no-op. It is better to implement it as a no-op function to avoid setting error code.
Definition at line 529 of file materials.h.
const char* aws_cryptosdk_keyring_vt::name |
Identifier for debugging purposes only.
Definition at line 524 of file materials.h.
int(* aws_cryptosdk_keyring_vt::on_decrypt) (struct aws_cryptosdk_keyring *keyring, struct aws_allocator *request_alloc, struct aws_byte_buf *unencrypted_data_key, struct aws_array_list *keyring_trace, const struct aws_array_list *edks, const struct aws_hash_table *enc_ctx, enum aws_cryptosdk_alg_id alg) |
VIRTUAL FUNCTION: must implement if used for decryption.
Implementations must properly initialize the unencrypted data key buffer when an EDK is decrypted and leave the unencrypted data key buffer pointer set to NULL when no EDK is decrypted. Implementations should return AWS_OP_SUCCESS regardless of whether the unencrypted data key is recovered, except in cases of internal errors.
Definition at line 557 of file materials.h.
int(* aws_cryptosdk_keyring_vt::on_encrypt) (struct aws_cryptosdk_keyring *keyring, struct aws_allocator *request_alloc, struct aws_byte_buf *unencrypted_data_key, struct aws_array_list *keyring_trace, struct aws_array_list *edks, const struct aws_hash_table *enc_ctx, enum aws_cryptosdk_alg_id alg) |
VIRTUAL FUNCTION: must implement if used for encryption.
When the buffer for the unencrypted data key is not NULL at the time of the call, it must not be changed by callee. All buffers for EDKs pushed onto the list must be in a valid state, which means either that they are set to all zeroes or that they have been initialized using one of the byte buffer initialization functions. This assures proper clean up and serialization.
Definition at line 540 of file materials.h.
size_t aws_cryptosdk_keyring_vt::vt_size |
Always set to sizeof(struct aws_cryptosdk_keyring_vt).
Definition at line 520 of file materials.h.