1 /*************************************************************************
6 * [2011] - [2015] Realm Inc
9 * NOTICE: All information contained herein is, and remains
10 * the property of Realm Incorporated and its suppliers,
11 * if any. The intellectual and technical concepts contained
12 * herein are proprietary to Realm Incorporated
13 * and its suppliers and may be covered by U.S. and Foreign Patents,
14 * patents in process, and are protected by trade secret or copyright law.
15 * Dissemination of this information or reproduction of this material
16 * is strictly forbidden unless prior written permission is obtained
17 * from Realm Incorporated.
19 **************************************************************************/
21 #ifndef REALM_SYNC_CRYPTO_HPP
22 #define REALM_SYNC_CRYPTO_HPP
27 #include <realm/binary_data.hpp>
28 #include <realm/util/buffer.hpp>
34 /// sha1() calculates the sha1 hash value of \param in_buffer of size \param
35 /// in_buffer_size. The value is placed in \param out_buffer. The value has
36 /// size 20, and the caller must ensure that \param out_buffer has size at
38 /// sha1() throws an exception if the underlying openssl implementation
39 /// fails, which should just happen in case of memory allocation failure.
40 void sha1(const char* in_buffer, size_t in_buffer_size, char* out_buffer);
46 #endif // REALM_SYNC_CRYPTO_HPP