diff options
author | Jack Lloyd <[email protected]> | 2018-08-10 12:44:55 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-08-10 12:44:55 -0400 |
commit | 87e4cd8c71511837b38406802f6e92e32b1890e9 (patch) | |
tree | 000aed5da6cfabd3009937a88cafb959f3988ea1 /src/lib/ffi/ffi.h | |
parent | 256cfa3be098fb45d5c2de047f88786e88051e73 (diff) |
Add functions to get size of PK ciphertext,plaintext
Needed for https://github.com/strongswan/strongswan/pull/109
Diffstat (limited to 'src/lib/ffi/ffi.h')
-rw-r--r-- | src/lib/ffi/ffi.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/ffi/ffi.h b/src/lib/ffi/ffi.h index 210c41eeb..19a65f946 100644 --- a/src/lib/ffi/ffi.h +++ b/src/lib/ffi/ffi.h @@ -1090,10 +1090,16 @@ BOTAN_PUBLIC_API(2,0) int botan_pk_op_encrypt_create(botan_pk_op_encrypt_t* op, BOTAN_PUBLIC_API(2,0) int botan_pk_op_encrypt_destroy(botan_pk_op_encrypt_t op); +BOTAN_PUBLIC_API(2,8) int botan_pk_op_encrypt_output_length(botan_pk_op_encrypt_t op, + size_t ptext_len, + size_t* ctext_len); + BOTAN_PUBLIC_API(2,0) 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); + botan_rng_t rng, + uint8_t out[], + size_t* out_len, + const uint8_t plaintext[], + size_t plaintext_len); /* * Public Key Decryption @@ -1106,6 +1112,10 @@ BOTAN_PUBLIC_API(2,0) int botan_pk_op_decrypt_create(botan_pk_op_decrypt_t* op, uint32_t flags); BOTAN_PUBLIC_API(2,0) int botan_pk_op_decrypt_destroy(botan_pk_op_decrypt_t op); +BOTAN_PUBLIC_API(2,8) int botan_pk_op_decrypt_output_length(botan_pk_op_decrypt_t op, + size_t ctext_len, + size_t* ptext_len); + BOTAN_PUBLIC_API(2,0) 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); |