|
int(* | random_func )(uint8_t *data, size_t len, void *user_data) |
|
int(* | hmac_sha256_init_func )(void **hmac_context, const uint8_t *key, size_t key_len, void *user_data) |
|
int(* | hmac_sha256_update_func )(void *hmac_context, const uint8_t *data, size_t data_len, void *user_data) |
|
int(* | hmac_sha256_final_func )(void *hmac_context, signal_buffer **output, void *user_data) |
|
void(* | hmac_sha256_cleanup_func )(void *hmac_context, void *user_data) |
|
int(* | sha512_digest_init_func )(void **digest_context, void *user_data) |
|
int(* | sha512_digest_update_func )(void *digest_context, const uint8_t *data, size_t data_len, void *user_data) |
|
int(* | sha512_digest_final_func )(void *digest_context, signal_buffer **output, void *user_data) |
|
void(* | sha512_digest_cleanup_func )(void *digest_context, void *user_data) |
|
int(* | encrypt_func )(signal_buffer **output, int cipher, const uint8_t *key, size_t key_len, const uint8_t *iv, size_t iv_len, const uint8_t *plaintext, size_t plaintext_len, void *user_data) |
|
int(* | decrypt_func )(signal_buffer **output, int cipher, const uint8_t *key, size_t key_len, const uint8_t *iv, size_t iv_len, const uint8_t *ciphertext, size_t ciphertext_len, void *user_data) |
|
void * | user_data |
|
◆ decrypt_func
int(* signal_crypto_provider::decrypt_func) (signal_buffer **output, int cipher, const uint8_t *key, size_t key_len, const uint8_t *iv, size_t iv_len, const uint8_t *ciphertext, size_t ciphertext_len, void *user_data) |
Callback for an AES decryption implementation.
- Parameters
-
output | buffer to be allocated and populated with the plaintext |
cipher | specific cipher variant to use, either SG_CIPHER_AES_CTR_NOPADDING or SG_CIPHER_AES_CBC_PKCS5 |
key | the encryption key |
key_len | length of the encryption key |
iv | the initialization vector |
iv_len | length of the initialization vector |
ciphertext | the ciphertext to decrypt |
ciphertext_len | length of the ciphertext |
- Returns
- 0 on success, negative on failure
◆ encrypt_func
int(* signal_crypto_provider::encrypt_func) (signal_buffer **output, int cipher, const uint8_t *key, size_t key_len, const uint8_t *iv, size_t iv_len, const uint8_t *plaintext, size_t plaintext_len, void *user_data) |
Callback for an AES encryption implementation.
- Parameters
-
output | buffer to be allocated and populated with the ciphertext |
cipher | specific cipher variant to use, either SG_CIPHER_AES_CTR_NOPADDING or SG_CIPHER_AES_CBC_PKCS5 |
key | the encryption key |
key_len | length of the encryption key |
iv | the initialization vector |
iv_len | length of the initialization vector |
plaintext | the plaintext to encrypt |
plaintext_len | length of the plaintext |
- Returns
- 0 on success, negative on failure
◆ hmac_sha256_cleanup_func
void(* signal_crypto_provider::hmac_sha256_cleanup_func) (void *hmac_context, void *user_data) |
Callback for an HMAC-SHA256 implementation. This function shall free the private context allocated in hmac_sha256_init_func.
- Parameters
-
hmac_context | private HMAC context pointer |
◆ hmac_sha256_final_func
int(* signal_crypto_provider::hmac_sha256_final_func) (void *hmac_context, signal_buffer **output, void *user_data) |
Callback for an HMAC-SHA256 implementation. This function shall finalize an HMAC calculation and populate the output buffer with the result.
- Parameters
-
hmac_context | private HMAC context pointer |
output | buffer to be allocated and populated with the result |
- Returns
- 0 on success, negative on failure
◆ hmac_sha256_init_func
int(* signal_crypto_provider::hmac_sha256_init_func) (void **hmac_context, const uint8_t *key, size_t key_len, void *user_data) |
Callback for an HMAC-SHA256 implementation. This function shall initialize an HMAC context with the provided key.
- Parameters
-
hmac_context | private HMAC context pointer |
key | pointer to the key |
key_len | length of the key |
- Returns
- 0 on success, negative on failure
◆ hmac_sha256_update_func
int(* signal_crypto_provider::hmac_sha256_update_func) (void *hmac_context, const uint8_t *data, size_t data_len, void *user_data) |
Callback for an HMAC-SHA256 implementation. This function shall update the HMAC context with the provided data
- Parameters
-
hmac_context | private HMAC context pointer |
data | pointer to the data |
data_len | length of the data |
- Returns
- 0 on success, negative on failure
◆ random_func
int(* signal_crypto_provider::random_func) (uint8_t *data, size_t len, void *user_data) |
Callback for a secure random number generator. This function shall fill the provided buffer with random bytes.
- Parameters
-
data | pointer to the output buffer |
len | size of the output buffer |
- Returns
- 0 on success, negative on failure
◆ sha512_digest_cleanup_func
void(* signal_crypto_provider::sha512_digest_cleanup_func) (void *digest_context, void *user_data) |
Callback for a SHA512 message digest implementation. This function shall free the private context allocated in sha512_digest_init_func.
- Parameters
-
digest_context | private digest context pointer |
◆ sha512_digest_final_func
int(* signal_crypto_provider::sha512_digest_final_func) (void *digest_context, signal_buffer **output, void *user_data) |
Callback for a SHA512 message digest implementation. This function shall finalize the digest calculation, populate the output buffer with the result, and prepare the context for reuse.
- Parameters
-
digest_context | private digest context pointer |
output | buffer to be allocated and populated with the result |
- Returns
- 0 on success, negative on failure
◆ sha512_digest_init_func
int(* signal_crypto_provider::sha512_digest_init_func) (void **digest_context, void *user_data) |
Callback for a SHA512 message digest implementation. This function shall initialize a digest context.
- Parameters
-
digest_context | private digest context pointer |
- Returns
- 0 on success, negative on failure
◆ sha512_digest_update_func
int(* signal_crypto_provider::sha512_digest_update_func) (void *digest_context, const uint8_t *data, size_t data_len, void *user_data) |
Callback for a SHA512 message digest implementation. This function shall update the digest context with the provided data.
- Parameters
-
digest_context | private digest context pointer |
data | pointer to the data |
data_len | length of the data |
- Returns
- 0 on success, negative on failure
◆ user_data
void* signal_crypto_provider::user_data |
The documentation for this struct was generated from the following file: