Print this page
XXX Enlarge data buffer in digest/mac to boost performance
@@ -49,11 +49,15 @@
#include <security/cryptoki.h>
#include <limits.h>
#include <cryptoutil.h>
#include <kmfapi.h>
-#define BUFFERSIZE (4096) /* Buffer size for reading file */
+/*
+ * Buffer size for reading file. This is given a rather high value
+ * to get better performance when a hardware provider is present.
+ */
+#define BUFFERSIZE (1024 * 64)
/*
* RESULTLEN - large enough size in bytes to hold result for
* digest and mac results for all mechanisms
*/