Add crypto hash SM3.
[libgcrypt.git] / cipher / cipher-selftest.h
index 41d77af..a435080 100644 (file)
@@ -1,5 +1,5 @@
 /* cipher-selftest.h - Helper functions for bulk encryption selftests.
- *     Copyright © 2013 Jussi Kivilinna <jussi.kivilinna@iki.fi>
+ * Copyright (C) 2013 Jussi Kivilinna <jussi.kivilinna@iki.fi>
  *
  * This file is part of Libgcrypt.
  *
 typedef void (*gcry_cipher_bulk_cbc_dec_t)(void *context, unsigned char *iv,
                                           void *outbuf_arg,
                                           const void *inbuf_arg,
-                                          unsigned int nblocks);
+                                          size_t nblocks);
 
 typedef void (*gcry_cipher_bulk_cfb_dec_t)(void *context, unsigned char *iv,
                                           void *outbuf_arg,
                                           const void *inbuf_arg,
-                                          unsigned int nblocks);
+                                          size_t nblocks);
 
 typedef void (*gcry_cipher_bulk_ctr_enc_t)(void *context, unsigned char *iv,
                                           void *outbuf_arg,
                                           const void *inbuf_arg,
-                                          unsigned int nblocks);
+                                          size_t nblocks);
+
+/* Helper function to allocate an aligned context for selftests.  */
+void *_gcry_cipher_selftest_alloc_ctx (const int context_size,
+                                       unsigned char **r_mem);
+
 
 /* Helper function for bulk CBC decryption selftest */
 const char *