+ c->set_key(c, key, c->key_len);
+}
+
+/**
+ * Set the current key (of variable size) used by the cipher.
+ *
+ * This function is useful for ciphers that allow a variable size for the key
+ * (even with a fixed state). For all the other ciphers, the length must
+ * match the value returned by \a cipher_key_len().
+ *
+ * \note the buffer pointed by \a key is not modified and it is
+ * not needed anymore after this call returns.
+ */
+INLINE void cipher_set_vkey(BlockCipher *c, const void *key, size_t len)
+{
+ ASSERT(c->set_key);
+ c->set_key(c, key, len);