OLD | NEW |
(Empty) | |
| 1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. |
| 4 */ |
| 5 |
| 6 /* This file contains NaCl private interfaces for hashing. This interface |
| 7 * is not versioned and is for internal Chrome use. It may change without |
| 8 * notice. If we convert the NaCl plugin from PPAPI to be renderer code |
| 9 * then we can depend on the chrome hash functions directly. |
| 10 */ |
| 11 |
| 12 /* PPB_NaCl_Hash_Private */ |
| 13 interface PPB_NaCl_Hash_Private { |
| 14 // Create a hasher object for incremental hashing. |
| 15 mem_t CreateSHA256Hasher(); |
| 16 |
| 17 // Update the hash with len more bytes of data. |
| 18 void Update([inout] mem_t hasher, [in] mem_t data, uint32_t len); |
| 19 |
| 20 // Finish hashing and get a digest up to len bytes. |
| 21 void Finish([inout] mem_t hasher, [out] mem_t output, [in] uint32_t len); |
| 22 |
| 23 // Delete the hasher object. |
| 24 void Delete([in] mem_t hasher); |
| 25 |
| 26 // Compare two hashes and return PP_TRUE if they are equal. |
| 27 PP_Bool SecureMemEqual([in] mem_t hash1, [in] mem_t hash2, |
| 28 [in] uint32_t len); |
| 29 }; |
OLD | NEW |