Index: ppapi/api/private/ppb_nacl_hash_private.idl |
diff --git a/ppapi/api/private/ppb_nacl_hash_private.idl b/ppapi/api/private/ppb_nacl_hash_private.idl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..57912628f51d4732af39086a3b4dc6bace23460d |
--- /dev/null |
+++ b/ppapi/api/private/ppb_nacl_hash_private.idl |
@@ -0,0 +1,29 @@ |
+/* 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. |
+ */ |
+ |
+/* 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. |
+ */ |
+ |
+/* PPB_NaCl_Hash_Private */ |
+interface PPB_NaCl_Hash_Private { |
+ // Create the hash object for incremental hashing. |
+ mem_t CreateSHA256Hash(); |
dmichael (off chromium)
2013/05/01 17:22:15
Should that be "CreateSHA256Hasher" or "...HashObj
jvoung (off chromium)
2013/05/01 18:23:00
Done.
|
+ |
+ // Update the hash with len more bytes of data. |
+ void Update([inout] mem_t hasher, [in] mem_t data, uint32_t len); |
+ |
+ // Finish hashing and get a digest up to len bytes. |
+ void Finish([inout] mem_t hasher, [out] mem_t output, [in] uint32_t len); |
+ |
+ // Delete the hash object. |
+ void Delete([inout] mem_t hasher); |
dmichael (off chromium)
2013/05/01 17:22:15
I think it's appropriate to just use [in] for the
jvoung (off chromium)
2013/05/01 18:23:00
Hmm, but Update() and Finish() can modify the hash
dmichael (off chromium)
2013/05/01 18:34:15
But you don't modify the actual |hasher| pointer.
jvoung (off chromium)
2013/05/01 19:18:43
Do you mean that the pointer won't end up pointing
|
+ |
+ // Compare two hashes and return PP_TRUE if they are equal. |
+ PP_Bool SecureMemEqual([in] str_t hash1, [in] str_t hash2, |
dmichael (off chromium)
2013/05/01 17:22:15
Any reason you're using str_t and mem_t elsewhere?
jvoung (off chromium)
2013/05/01 18:23:00
Ah yes, will convert to mem_t. Originally I had s
|
+ [in] uint32_t len); |
+}; |