|
Botan 3.13.0
Crypto and TLS for C&
|
#include <botan/ffi.h>#include <botan/pubkey.h>#include <botan/system_rng.h>#include <botan/internal/ffi_pkey.h>#include <botan/internal/ffi_rng.h>#include <botan/internal/ffi_util.h>Go to the source code of this file.
Functions | |
| BOTAN_FFI_DECLARE_STRUCT (botan_pk_op_decrypt_struct, Botan::PK_Decryptor, 0x912F3C37) | |
| BOTAN_FFI_DECLARE_STRUCT (botan_pk_op_encrypt_struct, Botan::PK_Encryptor, 0x891F3FC3) | |
| BOTAN_FFI_DECLARE_STRUCT (botan_pk_op_ka_struct, Botan::PK_Key_Agreement, 0x2939CAB1) | |
| BOTAN_FFI_DECLARE_STRUCT (botan_pk_op_kem_decrypt_struct, Botan::PK_KEM_Decryptor, 0x1743D8E6) | |
| BOTAN_FFI_DECLARE_STRUCT (botan_pk_op_kem_encrypt_struct, Botan::PK_KEM_Encryptor, 0x1D13A446) | |
| BOTAN_FFI_DECLARE_STRUCT (botan_pk_op_sign_struct, Botan::PK_Signer, 0x1AF0C39F) | |
| BOTAN_FFI_DECLARE_STRUCT (botan_pk_op_verify_struct, Botan::PK_Verifier, 0x2B91F936) | |
| int | botan_pk_op_decrypt (botan_pk_op_decrypt_t op, uint8_t out[], size_t *out_len, const uint8_t ciphertext[], size_t ciphertext_len) |
| int | botan_pk_op_decrypt_create (botan_pk_op_decrypt_t *op, botan_privkey_t key_obj, const char *padding, uint32_t flags) |
| int | botan_pk_op_decrypt_destroy (botan_pk_op_decrypt_t op) |
| int | botan_pk_op_decrypt_output_length (botan_pk_op_decrypt_t op, size_t ctext_len, size_t *ptext_len) |
| int | botan_pk_op_encrypt (botan_pk_op_encrypt_t op, botan_rng_t rng_obj, uint8_t out[], size_t *out_len, const uint8_t plaintext[], size_t plaintext_len) |
| int | botan_pk_op_encrypt_create (botan_pk_op_encrypt_t *op, botan_pubkey_t key_obj, const char *padding, uint32_t flags) |
| int | botan_pk_op_encrypt_destroy (botan_pk_op_encrypt_t op) |
| int | botan_pk_op_encrypt_output_length (botan_pk_op_encrypt_t op, size_t ptext_len, size_t *ctext_len) |
| int | botan_pk_op_kem_decrypt_create (botan_pk_op_kem_decrypt_t *op, botan_privkey_t key_obj, const char *padding) |
| int | botan_pk_op_kem_decrypt_destroy (botan_pk_op_kem_decrypt_t op) |
| int | botan_pk_op_kem_decrypt_shared_key (botan_pk_op_kem_decrypt_t op, const uint8_t salt[], size_t salt_len, const uint8_t encapsulated_key[], size_t encapsulated_key_len, size_t desired_shared_key_len, uint8_t shared_key_out[], size_t *shared_key_len) |
| int | botan_pk_op_kem_decrypt_shared_key_length (botan_pk_op_kem_decrypt_t op, size_t desired_shared_key_length, size_t *output_shared_key_length) |
| int | botan_pk_op_kem_encrypt_create (botan_pk_op_kem_encrypt_t *op, botan_pubkey_t key_obj, const char *padding) |
| int | botan_pk_op_kem_encrypt_create_shared_key (botan_pk_op_kem_encrypt_t op, botan_rng_t rng, const uint8_t salt[], size_t salt_len, size_t desired_shared_key_len, uint8_t shared_key_out[], size_t *shared_key_len, uint8_t encapsulated_key_out[], size_t *encapsulated_key_len) |
| int | botan_pk_op_kem_encrypt_destroy (botan_pk_op_kem_encrypt_t op) |
| int | botan_pk_op_kem_encrypt_encapsulated_key_length (botan_pk_op_kem_encrypt_t op, size_t *output_encapsulated_key_length) |
| int | botan_pk_op_kem_encrypt_shared_key_length (botan_pk_op_kem_encrypt_t op, size_t desired_shared_key_length, size_t *output_shared_key_length) |
| int | botan_pk_op_key_agreement (botan_pk_op_ka_t op, uint8_t out[], size_t *out_len, const uint8_t other_key[], size_t other_key_len, const uint8_t salt[], size_t salt_len) |
| int | botan_pk_op_key_agreement_create (botan_pk_op_ka_t *op, botan_privkey_t key_obj, const char *kdf, uint32_t flags) |
| int | botan_pk_op_key_agreement_destroy (botan_pk_op_ka_t op) |
| int | botan_pk_op_key_agreement_export_public (botan_privkey_t key, uint8_t out[], size_t *out_len) |
| int | botan_pk_op_key_agreement_size (botan_pk_op_ka_t op, size_t *out_len) |
| int | botan_pk_op_key_agreement_view_public (botan_privkey_t key, botan_view_ctx ctx, botan_view_bin_fn view) |
| int | botan_pk_op_sign_create (botan_pk_op_sign_t *op, botan_privkey_t key_obj, const char *hash, uint32_t flags) |
| int | botan_pk_op_sign_destroy (botan_pk_op_sign_t op) |
| int | botan_pk_op_sign_finish (botan_pk_op_sign_t op, botan_rng_t rng_obj, uint8_t out[], size_t *out_len) |
| int | botan_pk_op_sign_output_length (botan_pk_op_sign_t op, size_t *sig_len) |
| int | botan_pk_op_sign_update (botan_pk_op_sign_t op, const uint8_t in[], size_t in_len) |
| int | botan_pk_op_verify_create (botan_pk_op_verify_t *op, botan_pubkey_t key_obj, const char *hash, uint32_t flags) |
| int | botan_pk_op_verify_destroy (botan_pk_op_verify_t op) |
| int | botan_pk_op_verify_finish (botan_pk_op_verify_t op, const uint8_t sig[], size_t sig_len) |
| int | botan_pk_op_verify_update (botan_pk_op_verify_t op, const uint8_t in[], size_t in_len) |
| BOTAN_FFI_DECLARE_STRUCT | ( | botan_pk_op_decrypt_struct | , |
| Botan::PK_Decryptor | , | ||
| 0x912F3C37 | ) |
| BOTAN_FFI_DECLARE_STRUCT | ( | botan_pk_op_encrypt_struct | , |
| Botan::PK_Encryptor | , | ||
| 0x891F3FC3 | ) |
| BOTAN_FFI_DECLARE_STRUCT | ( | botan_pk_op_ka_struct | , |
| Botan::PK_Key_Agreement | , | ||
| 0x2939CAB1 | ) |
| BOTAN_FFI_DECLARE_STRUCT | ( | botan_pk_op_kem_decrypt_struct | , |
| Botan::PK_KEM_Decryptor | , | ||
| 0x1743D8E6 | ) |
| BOTAN_FFI_DECLARE_STRUCT | ( | botan_pk_op_kem_encrypt_struct | , |
| Botan::PK_KEM_Encryptor | , | ||
| 0x1D13A446 | ) |
| BOTAN_FFI_DECLARE_STRUCT | ( | botan_pk_op_sign_struct | , |
| Botan::PK_Signer | , | ||
| 0x1AF0C39F | ) |
| BOTAN_FFI_DECLARE_STRUCT | ( | botan_pk_op_verify_struct | , |
| Botan::PK_Verifier | , | ||
| 0x2B91F936 | ) |
| int botan_pk_op_decrypt | ( | botan_pk_op_decrypt_t | op, |
| uint8_t | out[], | ||
| size_t * | out_len, | ||
| const uint8_t | ciphertext[], | ||
| size_t | ciphertext_len ) |
Decrypt a message with a private key
| op | the decryption operation |
| out | output buffer |
| out_len | on input the size of out, on output the number of bytes written or required |
| ciphertext | the message to decrypt |
| ciphertext_len | length of ciphertext in bytes |
Definition at line 105 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_VISIT, and Botan_FFI::write_vec_output().
| int botan_pk_op_decrypt_create | ( | botan_pk_op_decrypt_t * | op, |
| botan_privkey_t | key, | ||
| const char * | padding, | ||
| uint32_t | flags ) |
Create a public key decryption operation
| op | the new object will be placed here |
| key | the private key to decrypt with |
| padding | the padding/encoding method, eg "OAEP(SHA-256)" |
| flags | should be 0 in current API revision |
Definition at line 74 of file ffi_pk_op.cpp.
References Botan::any_null_pointers(), BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_NULL_POINTER, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), Botan_FFI::safe_get(), and Botan::system_rng().
| int botan_pk_op_decrypt_destroy | ( | botan_pk_op_decrypt_t | op | ) |
Frees all resources of the decryption operation object
| op | the operation to destroy |
Definition at line 94 of file ffi_pk_op.cpp.
References BOTAN_FFI_CHECKED_DELETE.
| int botan_pk_op_decrypt_output_length | ( | botan_pk_op_decrypt_t | op, |
| size_t | ctext_len, | ||
| size_t * | ptext_len ) |
Return an upper bound on the plaintext length for a given ciphertext length
| op | the decryption operation |
| ctext_len | the ciphertext length in bytes |
| ptext_len | set to the maximum plaintext length in bytes |
Definition at line 98 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, and BOTAN_FFI_VISIT.
| int botan_pk_op_encrypt | ( | botan_pk_op_encrypt_t | op, |
| botan_rng_t | rng, | ||
| uint8_t | out[], | ||
| size_t * | out_len, | ||
| const uint8_t | plaintext[], | ||
| size_t | plaintext_len ) |
Encrypt a message with a public key
| op | the encryption operation |
| Random Number Generators | a random number generator |
| out | output buffer |
| out_len | on input the size of out, on output the number of bytes written or required |
| plaintext | the message to encrypt |
| plaintext_len | length of plaintext in bytes |
Definition at line 56 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_VISIT, Botan_FFI::safe_get(), and Botan_FFI::write_vec_output().
| int botan_pk_op_encrypt_create | ( | botan_pk_op_encrypt_t * | op, |
| botan_pubkey_t | key, | ||
| const char * | padding, | ||
| uint32_t | flags ) |
Create a public key encryption operation
| op | the new object will be placed here |
| key | the public key to encrypt to |
| padding | the padding/encoding method, eg "OAEP(SHA-256)" |
| flags | should be 0 in current API revision |
Definition at line 28 of file ffi_pk_op.cpp.
References Botan::any_null_pointers(), BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_PUBKEY_DER_FORMAT_SIGNATURE, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), Botan_FFI::safe_get(), and Botan::system_rng().
| int botan_pk_op_encrypt_destroy | ( | botan_pk_op_encrypt_t | op | ) |
Frees all resources of the encryption operation object
| op | the operation to destroy |
Definition at line 45 of file ffi_pk_op.cpp.
References BOTAN_FFI_CHECKED_DELETE.
| int botan_pk_op_encrypt_output_length | ( | botan_pk_op_encrypt_t | op, |
| size_t | ptext_len, | ||
| size_t * | ctext_len ) |
Return the ciphertext length for a given plaintext length
| op | the encryption operation |
| ptext_len | the plaintext length in bytes |
| ctext_len | set to the resulting ciphertext length in bytes |
Definition at line 49 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, and BOTAN_FFI_VISIT.
| int botan_pk_op_kem_decrypt_create | ( | botan_pk_op_kem_decrypt_t * | op, |
| botan_privkey_t | key, | ||
| const char * | kdf ) |
Create a key decapsulation operation
| op | the new object will be placed here |
| key | the private key to decapsulate with |
| Key Derivation Functions | the KDF applied to the shared secret, or "Raw" for no KDF |
Definition at line 341 of file ffi_pk_op.cpp.
References Botan::any_null_pointers(), BOTAN_FFI_ERROR_NULL_POINTER, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), Botan_FFI::safe_get(), and Botan::system_rng().
| int botan_pk_op_kem_decrypt_destroy | ( | botan_pk_op_kem_decrypt_t | op | ) |
Frees all resources of the key decapsulation operation object
| op | the operation to destroy |
Definition at line 388 of file ffi_pk_op.cpp.
References BOTAN_FFI_CHECKED_DELETE.
| int botan_pk_op_kem_decrypt_shared_key | ( | botan_pk_op_kem_decrypt_t | op, |
| const uint8_t | salt[], | ||
| size_t | salt_len, | ||
| const uint8_t | encapsulated_key[], | ||
| size_t | encapsulated_key_len, | ||
| size_t | desired_shared_key_len, | ||
| uint8_t | shared_key[], | ||
| size_t * | shared_key_len ) |
Recover the shared key from an encapsulated key
| op | the decapsulation operation |
| salt | a salt passed to the KDF, may be NULL if salt_len is 0 |
| salt_len | length of salt in bytes |
| encapsulated_key | the encapsulated key from the counterparty |
| encapsulated_key_len | length of encapsulated_key in bytes |
| desired_shared_key_len | the requested shared key length in bytes |
| shared_key | output buffer for the shared key |
| shared_key_len | on input the size of shared_key, on output the number of bytes written |
Definition at line 365 of file ffi_pk_op.cpp.
References Botan::any_null_pointers(), BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_VISIT, and Botan_FFI::write_vec_output().
| int botan_pk_op_kem_decrypt_shared_key_length | ( | botan_pk_op_kem_decrypt_t | op, |
| size_t | desired_shared_key_length, | ||
| size_t * | output_shared_key_length ) |
Return the length of the shared key this operation will produce
| op | the decapsulation operation |
| desired_shared_key_length | the requested shared key length in bytes |
| output_shared_key_length | set to the shared key length that will result |
Definition at line 352 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, and BOTAN_FFI_VISIT.
| int botan_pk_op_kem_encrypt_create | ( | botan_pk_op_kem_encrypt_t * | op, |
| botan_pubkey_t | key, | ||
| const char * | kdf ) |
Create a key encapsulation operation
| op | the new object will be placed here |
| key | the public key to encapsulate to |
| Key Derivation Functions | the KDF applied to the shared secret, or "Raw" for no KDF |
Definition at line 275 of file ffi_pk_op.cpp.
References Botan::any_null_pointers(), BOTAN_FFI_ERROR_NULL_POINTER, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
| int botan_pk_op_kem_encrypt_create_shared_key | ( | botan_pk_op_kem_encrypt_t | op, |
| botan_rng_t | rng, | ||
| const uint8_t | salt[], | ||
| size_t | salt_len, | ||
| size_t | desired_shared_key_len, | ||
| uint8_t | shared_key[], | ||
| size_t * | shared_key_len, | ||
| uint8_t | encapsulated_key[], | ||
| size_t * | encapsulated_key_len ) |
Generate a shared key along with the encapsulation of it for the counterparty
| op | the encapsulation operation |
| Random Number Generators | a random number generator |
| salt | a salt passed to the KDF, may be NULL if salt_len is 0 |
| salt_len | length of salt in bytes |
| desired_shared_key_len | the requested shared key length in bytes |
| shared_key | output buffer for the shared key |
| shared_key_len | on input the size of shared_key, on output the number of bytes written |
| encapsulated_key | output buffer for the encapsulated key |
| encapsulated_key_len | on input the size of encapsulated_key, on output the number of bytes written |
Definition at line 315 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_VISIT, Botan_FFI::safe_get(), and Botan_FFI::write_vec_output().
| int botan_pk_op_kem_encrypt_destroy | ( | botan_pk_op_kem_encrypt_t | op | ) |
Frees all resources of the key encapsulation operation object
| op | the operation to destroy |
Definition at line 286 of file ffi_pk_op.cpp.
References BOTAN_FFI_CHECKED_DELETE.
| int botan_pk_op_kem_encrypt_encapsulated_key_length | ( | botan_pk_op_kem_encrypt_t | op, |
| size_t * | output_encapsulated_key_length ) |
Return the length of the encapsulated key this operation produces
| op | the encapsulation operation |
| output_encapsulated_key_length | set to the encapsulated key length in bytes |
Definition at line 303 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, and BOTAN_FFI_VISIT.
| int botan_pk_op_kem_encrypt_shared_key_length | ( | botan_pk_op_kem_encrypt_t | op, |
| size_t | desired_shared_key_length, | ||
| size_t * | output_shared_key_length ) |
Return the length of the shared key this operation will produce
| op | the encapsulation operation |
| desired_shared_key_length | the requested shared key length in bytes |
| output_shared_key_length | set to the shared key length that will result |
Definition at line 290 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, and BOTAN_FFI_VISIT.
| int botan_pk_op_key_agreement | ( | botan_pk_op_ka_t | op, |
| uint8_t | out[], | ||
| size_t * | out_len, | ||
| const uint8_t | other_key[], | ||
| size_t | other_key_len, | ||
| const uint8_t | salt[], | ||
| size_t | salt_len ) |
Perform key agreement with the counterparty's public value
| op | the key agreement operation |
| out | output buffer |
| out_len | on input the size of out, on output the number of bytes written or required |
| other_key | the counterparty's public value |
| other_key_len | length of other_key in bytes |
| salt | a salt passed to the KDF, may be NULL if salt_len is 0 |
| salt_len | length of salt in bytes |
Definition at line 252 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_VISIT, and Botan_FFI::write_vec_output().
| int botan_pk_op_key_agreement_create | ( | botan_pk_op_ka_t * | op, |
| botan_privkey_t | key, | ||
| const char * | kdf, | ||
| uint32_t | flags ) |
Create a key agreement operation
| op | the new object will be placed here |
| key | our private key |
| Key Derivation Functions | the KDF applied to the shared secret, or "Raw" for no KDF |
| flags | should be 0 in current API revision |
Definition at line 208 of file ffi_pk_op.cpp.
References Botan::any_null_pointers(), BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_NULL_POINTER, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), Botan_FFI::safe_get(), and Botan::system_rng().
| int botan_pk_op_key_agreement_destroy | ( | botan_pk_op_ka_t | op | ) |
Frees all resources of the key agreement operation object
| op | the operation to destroy |
Definition at line 224 of file ffi_pk_op.cpp.
References BOTAN_FFI_CHECKED_DELETE.
| int botan_pk_op_key_agreement_export_public | ( | botan_privkey_t | key, |
| uint8_t | out[], | ||
| size_t * | out_len ) |
Export the public value of a key agreement private key, in the format expected by botan_pk_op_key_agreement
| key | the key agreement private key |
| out | output buffer |
| out_len | on input the size of out, on output the number of bytes written or required |
Definition at line 228 of file ffi_pk_op.cpp.
References botan_pk_op_key_agreement_view_public(), and Botan_FFI::copy_view_bin().
| int botan_pk_op_key_agreement_size | ( | botan_pk_op_ka_t | op, |
| size_t * | out_len ) |
Return the length of the shared secret this operation produces
| op | the key agreement operation |
| out_len | set to the output length in bytes |
Definition at line 242 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, and BOTAN_FFI_VISIT.
| int botan_pk_op_key_agreement_view_public | ( | botan_privkey_t | key, |
| botan_view_ctx | ctx, | ||
| botan_view_bin_fn | view ) |
View the public value of a key agreement private key
| key | the key agreement private key |
| ctx | an application context passed to the view function |
| view | the view callback which receives the encoding |
Definition at line 232 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_INVALID_INPUT, BOTAN_FFI_VISIT, and Botan_FFI::invoke_view_callback().
Referenced by botan_pk_op_key_agreement_export_public().
| int botan_pk_op_sign_create | ( | botan_pk_op_sign_t * | op, |
| botan_privkey_t | key, | ||
| const char * | hash_and_padding, | ||
| uint32_t | flags ) |
Create a signature generation operation
| op | the new object will be placed here |
| key | the private key to sign with |
| hash_and_padding | the signature padding and hash, eg "PSS(SHA-256)" |
| flags | 0, or BOTAN_PUBKEY_DER_FORMAT_SIGNATURE to request DER encoded signatures |
Definition at line 118 of file ffi_pk_op.cpp.
References Botan::any_null_pointers(), BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_PUBKEY_DER_FORMAT_SIGNATURE, Botan::DerSequence, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), Botan_FFI::safe_get(), Botan::Standard, and Botan::system_rng().
| int botan_pk_op_sign_destroy | ( | botan_pk_op_sign_t | op | ) |
Frees all resources of the signature generation operation object
| op | the operation to destroy |
Definition at line 138 of file ffi_pk_op.cpp.
References BOTAN_FFI_CHECKED_DELETE.
| int botan_pk_op_sign_finish | ( | botan_pk_op_sign_t | op, |
| botan_rng_t | rng, | ||
| uint8_t | sig[], | ||
| size_t * | sig_len ) |
Produce a signature over the message, then reset for signing another message
| op | the signature operation |
| Random Number Generators | a random number generator |
| sig | output buffer |
| sig_len | on input the size of sig, on output the number of bytes written or required |
Definition at line 158 of file ffi_pk_op.cpp.
References BOTAN_FFI_VISIT, Botan_FFI::safe_get(), and Botan_FFI::write_vec_output().
| int botan_pk_op_sign_output_length | ( | botan_pk_op_sign_t | op, |
| size_t * | olen ) |
Return the length of the signatures this operation produces
| op | the signature operation |
| olen | set to the signature length in bytes |
Definition at line 142 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, and BOTAN_FFI_VISIT.
| int botan_pk_op_sign_update | ( | botan_pk_op_sign_t | op, |
| const uint8_t | in[], | ||
| size_t | in_len ) |
Add more data to the message being signed
| op | the signature operation |
| in | input buffer |
| in_len | number of bytes to read from the input buffer |
Definition at line 150 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, and BOTAN_FFI_VISIT.
| int botan_pk_op_verify_create | ( | botan_pk_op_verify_t * | op, |
| botan_pubkey_t | key, | ||
| const char * | hash_and_padding, | ||
| uint32_t | flags ) |
Create a signature verification operation
| op | the new object will be placed here |
| key | the public key to verify with |
| hash_and_padding | the signature padding and hash, eg "PSS(SHA-256)" |
| flags | 0, or BOTAN_PUBKEY_DER_FORMAT_SIGNATURE if the signature is DER encoded |
Definition at line 162 of file ffi_pk_op.cpp.
References Botan::any_null_pointers(), BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_PUBKEY_DER_FORMAT_SIGNATURE, Botan::DerSequence, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), Botan_FFI::safe_get(), and Botan::Standard.
| int botan_pk_op_verify_destroy | ( | botan_pk_op_verify_t | op | ) |
Frees all resources of the signature verification operation object
| op | the operation to destroy |
Definition at line 180 of file ffi_pk_op.cpp.
References BOTAN_FFI_CHECKED_DELETE.
| int botan_pk_op_verify_finish | ( | botan_pk_op_verify_t | op, |
| const uint8_t | sig[], | ||
| size_t | sig_len ) |
Check the signature over the message, then reset for verifying another message
| op | the verification operation |
| sig | the signature to check |
| sig_len | length of sig in bytes |
Definition at line 192 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_INVALID_VERIFIER, BOTAN_FFI_SUCCESS, and BOTAN_FFI_VISIT.
| int botan_pk_op_verify_update | ( | botan_pk_op_verify_t | op, |
| const uint8_t | in[], | ||
| size_t | in_len ) |
Add more data to the message being verified
| op | the verification operation |
| in | input buffer |
| in_len | number of bytes to read from the input buffer |
Definition at line 184 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, and BOTAN_FFI_VISIT.