]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Added gnutls_cipher_set_iv().
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 12 Apr 2011 10:18:02 +0000 (12:18 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 12 Apr 2011 10:18:19 +0000 (12:18 +0200)
lib/crypto-api.c
lib/includes/gnutls/crypto.h
lib/libgnutls.map

index f7f200c2f8aaea56623304932db4826683d721b0..5fb633ebc7a9f223844e684598bdff720f787144 100644 (file)
@@ -113,6 +113,23 @@ gnutls_cipher_add_auth (gnutls_cipher_hd_t handle, const void *text, size_t text
   return 0;
 }
 
+/**
+ * gnutls_cipher_set_iv:
+ * @handle: is a #gnutls_cipher_hd_t structure.
+ * @iv: the IV to set
+ * @ivlen: The length of the IV
+ *
+ * This function will set the IV to be used for the next
+ * encryption block.
+ *
+ * Since: 2.99.0
+ **/
+void
+gnutls_cipher_set_iv (gnutls_cipher_hd_t handle, void *iv, size_t ivlen)
+{
+  _gnutls_cipher_setiv((cipher_hd_st *)handle, iv, ivlen);
+}
+
 /**
  * gnutls_cipher_encrypt:
  * @handle: is a #gnutls_cipher_hd_t structure.
index f1312eeeb7ba753e2612de8c03db5edb39253c6c..a1cf4b5ba854db65c248c6863e8c8c66b6359814 100644 (file)
@@ -47,6 +47,8 @@ extern "C"
                               size_t textlen, void *ciphertext,
                               size_t ciphertextlen);
 
+  void gnutls_cipher_set_iv (gnutls_cipher_hd_t handle, void *iv, size_t ivlen);
+
   int gnutls_cipher_tag( gnutls_cipher_hd_t handle, void* tag, size_t tag_size);
   int gnutls_cipher_add_auth( gnutls_cipher_hd_t handle, const void* test, size_t textlen);
 
index 616dab745e78aba14cdc09a15568228c7a79cac4..85b301c7e9e58169561d52ed34226bce7a28545d 100644 (file)
@@ -701,6 +701,7 @@ GNUTLS_3_0_0 {
        gnutls_dtls_cookie_send;
        gnutls_dtls_prestate_set;
        gnutls_dtls_get_data_mtu;
+       gnutls_cipher_set_iv;
 } GNUTLS_2_12;
 
 GNUTLS_PRIVATE {