aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/base/buf_comp.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-02-16 20:12:38 +0000
committerlloyd <[email protected]>2015-02-16 20:12:38 +0000
commit3b9a0c1535e40f8f9fc4cfbc734144ee229df65d (patch)
tree30c1d4363b4c85561204d26344f40de3e78f6d9d /src/lib/base/buf_comp.h
parent85caef829c9eeb7c224ad3b2e3ffbcfe981c2428 (diff)
Add new module `ffi` which provides a plain C interface, plus a new
ctypes Python wrapper that uses it. The API is intentionally designed to have a very simple ABI (extern "C", all structs are opaque, no memory ownership passing the FFI boundary, limited set of simple types as args) so the ctypes wrapper is quite simple. Currently ffi provides ciphers, hashes, MACs, RNGs, PBKDF, KDF, bcrypt, and most public key operations. Remove the old boost.python wrapper and all the build code for it.
Diffstat (limited to 'src/lib/base/buf_comp.h')
-rw-r--r--src/lib/base/buf_comp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/base/buf_comp.h b/src/lib/base/buf_comp.h
index 5d11fdb73..564da2262 100644
--- a/src/lib/base/buf_comp.h
+++ b/src/lib/base/buf_comp.h
@@ -101,6 +101,13 @@ class BOTAN_DLL Buffered_Computation
return output;
}
+ template<typename Alloc>
+ void final(std::vector<byte, Alloc>& out)
+ {
+ out.resize(output_length());
+ final_result(&out[0]);
+ }
+
/**
* Update and finalize computation. Does the same as calling update()
* and final() consecutively.