diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ffi/ffi.cpp | 5 | ||||
-rw-r--r-- | src/lib/ffi/ffi.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp index eba3f5f94..69c559521 100644 --- a/src/lib/ffi/ffi.cpp +++ b/src/lib/ffi/ffi.cpp @@ -577,6 +577,11 @@ int botan_cipher_get_default_nonce_length(botan_cipher_t cipher, size_t* nl) return BOTAN_FFI_DO(Botan::Cipher_Mode, cipher, { *nl = cipher.default_nonce_length(); }); } +int botan_cipher_get_update_granularity(botan_cipher_t cipher, size_t* ug) + { + return BOTAN_FFI_DO(Botan::Cipher_Mode, cipher, { *ug = cipher.update_granularity(); }); + } + int botan_cipher_get_tag_length(botan_cipher_t cipher, size_t* tl) { return BOTAN_FFI_DO(Botan::Cipher_Mode, cipher, { *tl = cipher.tag_size(); }); diff --git a/src/lib/ffi/ffi.h b/src/lib/ffi/ffi.h index b4e99defd..ca92977f4 100644 --- a/src/lib/ffi/ffi.h +++ b/src/lib/ffi/ffi.h @@ -99,6 +99,7 @@ BOTAN_DLL int botan_cipher_init(botan_cipher_t* cipher, const char* name, uint32 BOTAN_DLL int botan_cipher_valid_nonce_length(botan_cipher_t cipher, size_t nl); BOTAN_DLL int botan_cipher_get_tag_length(botan_cipher_t cipher, size_t* tag_size); BOTAN_DLL int botan_cipher_get_default_nonce_length(botan_cipher_t cipher, size_t* nl); +BOTAN_DLL int botan_cipher_get_update_granularity(botan_cipher_t cipher, size_t* ug); BOTAN_DLL int botan_cipher_set_key(botan_cipher_t cipher, const uint8_t* key, size_t key_len); |