Add aesni_crypt_ecb() and use it
diff --git a/include/polarssl/aesni.h b/include/polarssl/aesni.h
index 9aaeff1..d6684fc 100644
--- a/include/polarssl/aesni.h
+++ b/include/polarssl/aesni.h
@@ -38,12 +38,27 @@
#if defined(POLARSSL_HAVE_X86_64)
/**
- * \brief AES_NI detection routine
+ * \brief AES-NI detection routine
*
* \return 1 if CPU supports AES-NI, 0 otherwise
*/
int aesni_supported( void );
+/**
+ * \brief AES-NI AES-ECB block en(de)cryption
+ *
+ * \param ctx AES context
+ * \param mode AES_ENCRYPT or AES_DECRYPT
+ * \param input 16-byte input block
+ * \param output 16-byte output block
+ *
+ * \return 0 if success, 1 if operation failed
+ */
+int aesni_crypt_ecb( aes_context *ctx,
+ int mode,
+ const unsigned char input[16],
+ unsigned char output[16] );
+
#endif /* POLARSSL_HAVE_X86_64 */
#endif /* POLARSSL_AESNI_H */