Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Unified Diff: ppapi/c/private/ppb_nacl_hash_private.h

Issue 14683004: Check that the PNaCl cache hash is truly derived from the bitcode content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/api/private/ppb_nacl_hash_private.idl ('k') | ppapi/native_client/src/trusted/plugin/plugin_error.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/private/ppb_nacl_hash_private.h
diff --git a/ppapi/c/private/ppb_nacl_hash_private.h b/ppapi/c/private/ppb_nacl_hash_private.h
new file mode 100644
index 0000000000000000000000000000000000000000..b7a637b942c7ebe4fe467657e2b009c6c3ac6f2d
--- /dev/null
+++ b/ppapi/c/private/ppb_nacl_hash_private.h
@@ -0,0 +1,51 @@
+/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* From private/ppb_nacl_hash_private.idl modified Wed May 1 11:04:31 2013. */
+
+#ifndef PPAPI_C_PRIVATE_PPB_NACL_HASH_PRIVATE_H_
+#define PPAPI_C_PRIVATE_PPB_NACL_HASH_PRIVATE_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_stdint.h"
+
+#define PPB_NACL_HASH_PRIVATE_INTERFACE_1_0 "PPB_NaCl_Hash_Private;1.0"
+#define PPB_NACL_HASH_PRIVATE_INTERFACE PPB_NACL_HASH_PRIVATE_INTERFACE_1_0
+
+/**
+ * @file
+ * This file contains NaCl private interfaces for hashing. This interface
+ * is not versioned and is for internal Chrome use. It may change without
+ * notice. If we convert the NaCl plugin from PPAPI to be renderer code
+ * then we can depend on the chrome hash functions directly.
+ */
+
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/* PPB_NaCl_Hash_Private */
+struct PPB_NaCl_Hash_Private_1_0 {
+ /* Create a hasher object for incremental hashing. */
+ void* (*CreateSHA256Hasher)(void);
+ /* Update the hash with len more bytes of data. */
+ void (*Update)(void* hasher, const void* data, uint32_t len);
+ /* Finish hashing and get a digest up to len bytes. */
+ void (*Finish)(void* hasher, void* output, uint32_t len);
+ /* Delete the hasher object. */
+ void (*Delete)(const void* hasher);
+ /* Compare two hashes and return PP_TRUE if they are equal. */
+ PP_Bool (*SecureMemEqual)(const void* hash1, const void* hash2, uint32_t len);
+};
+
+typedef struct PPB_NaCl_Hash_Private_1_0 PPB_NaCl_Hash_Private;
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PRIVATE_PPB_NACL_HASH_PRIVATE_H_ */
+
« no previous file with comments | « ppapi/api/private/ppb_nacl_hash_private.idl ('k') | ppapi/native_client/src/trusted/plugin/plugin_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698