]> tinc-vpn.org Git - tinc/blobdiff - src/openssl/cipher.c
tinc-gui: Reformat codebase according to PEP8
[tinc] / src / openssl / cipher.c
index 9b39a28836c151a81d039ce74c80694e5fddb51a..04aee27e4c55fad2f9244fbac28b1a3a6e1d8f7f 100644 (file)
@@ -79,6 +79,13 @@ size_t cipher_keylength(const cipher_t *cipher) {
        return cipher->cipher->key_len + cipher->cipher->iv_len;
 }
 
+size_t cipher_blocksize(const cipher_t *cipher) {
+       if(!cipher || !cipher->cipher)
+               return 1;
+
+       return cipher->cipher->block_size;
+}
+
 bool cipher_set_key(cipher_t *cipher, void *key, bool encrypt) {
        bool result;