Index: src/trusted/validator/caching/hashing_interface.h |
diff --git a/src/trusted/validator/caching/hashing_interface.h b/src/trusted/validator/caching/hashing_interface.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5629173f4c3ab100471b578aa5ff413d5e20ccf5 |
--- /dev/null |
+++ b/src/trusted/validator/caching/hashing_interface.h |
@@ -0,0 +1,24 @@ |
+/* |
+ * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_CACHING_HASHING_INTERFACE_H_ |
+#define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_CACHING_HASHING_INTERFACE_H_ |
+ |
+#include "native_client/src/include/nacl_base.h" |
+ |
+EXTERN_C_BEGIN |
+ |
+struct HashingInterface { |
+ void *(*create)(const unsigned char *key, const unsigned int length); |
bsy
2012/02/22 01:43:35
key length should not be an input parameter per se
Nick Bray (chromium)
2012/02/22 03:07:28
1) HMAC is spec'ed to accept keys of arbitrary siz
bsy
2012/02/22 18:28:15
just because hmac is spec'd to accept keys of arbi
|
+ void (*update)(void *ctx, const unsigned char *data, |
+ const unsigned int length); |
+ void (*end)(void *ctx, unsigned char *data, unsigned int *length, |
bsy
2012/02/22 01:43:35
suggest use common terminology -- instead of "end"
Nick Bray (chromium)
2012/02/22 03:07:28
Done.
|
+ const unsigned int max_length); |
bsy
2012/02/22 01:43:35
max usable max_length is also a hash parameter.
m
Nick Bray (chromium)
2012/02/22 03:07:28
I don't follow.
bsy
2012/02/22 18:28:15
the max length input parameter is the buffer size
|
+}; |
+ |
+EXTERN_C_END |
+ |
+#endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_CACHING_HASHING_INTERFACE_H_ */ |