aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi/ffi.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-02-16 23:25:15 +0000
committerlloyd <[email protected]>2015-02-16 23:25:15 +0000
commitd9ef5466f91b3da090ea4585e8fb8e478ffa3466 (patch)
treed11b3adac410df204b4732a8ae3496475ff7ac76 /src/lib/ffi/ffi.h
parent3b9a0c1535e40f8f9fc4cfbc734144ee229df65d (diff)
Python: docs, key agreement, fix bcrypt trailing null byte.
Initial very incomplete pass at error return value sanity.
Diffstat (limited to 'src/lib/ffi/ffi.h')
-rw-r--r--src/lib/ffi/ffi.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/ffi/ffi.h b/src/lib/ffi/ffi.h
index cda2c1480..34e706e2a 100644
--- a/src/lib/ffi/ffi.h
+++ b/src/lib/ffi/ffi.h
@@ -38,6 +38,11 @@ BOTAN_DLL uint32_t botan_version_datestamp();
/*
* Error handling
*/
+#define BOTAN_FFI_ERROR_EXCEPTION_THROWN (-20)
+#define BOTAN_FFI_ERROR_BAD_FLAG (-30)
+#define BOTAN_FFI_ERROR_NULL_POINTER (-31)
+#define BOTAN_FFI_ERROR_NULL_POINTER (-31)
+
//const char* botan_error_description(int err);
/*
@@ -146,10 +151,11 @@ BOTAN_DLL int botan_kdf(const char* kdf_algo,
*/
#if defined(BOTAN_HAS_BCRYPT)
-BOTAN_DLL int botan_bcrypt_generate(char* out, size_t out_len,
+BOTAN_DLL int botan_bcrypt_generate(uint8_t* out, size_t* out_len,
const char* pass,
botan_rng_t rng,
- size_t work_factor);
+ size_t work_factor,
+ uint32_t flags);
/**
* Returns 0 if if this password/hash combination is valid
@@ -290,6 +296,9 @@ BOTAN_DLL int botan_pk_op_key_agreement_create(botan_pk_op_ka_t* op,
uint32_t flags);
BOTAN_DLL int botan_pk_op_key_agreement_destroy(botan_pk_op_ka_t op);
+BOTAN_DLL int botan_pk_op_key_agreement_export_public(botan_privkey_t key,
+ uint8_t out[], size_t* out_len);
+
BOTAN_DLL 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,