HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NET_HMAC.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: NET_HMAC.h
7  *
8  * COMMENTS:
9  *
10  *
11  */
12 
13 #ifndef __NET_HMAC_H__
14 #define __NET_HMAC_H__
15 
16 #include "NET_API.h"
17 
18 #include <UT/UT_WorkBuffer.h>
19 #include <UT/UT_StringHolder.h>
20 
21 class UT_StringView;
22 class UT_StringHolder;
23 class UT_WorkBuffer;
25 
26 NET_API bool NEThmac(
27  const NET_DigestAlgorithm& alg,
28  const UT_StringView& input,
29  const UT_StringView& key,
30  UT_WorkBuffer& output,
31  bool use_base64 = true);
32 
33 NET_API bool NEThmac(
34  const NET_DigestAlgorithm& alg,
35  const UT_StringView& input,
36  const UT_StringView& key,
37  UT_StringHolder& output,
38  bool use_base64 = true);
39 
41  UT_WorkBuffer& output,
42  const NET_DigestAlgorithm& alg,
43  int key_len,
44  const UT_StringView& input,
45  const UT_StringView& salt,
46  int iterations);
47 
49  UT_StringHolder& output,
50  const NET_DigestAlgorithm& alg,
51  int key_len,
52  const UT_StringView& input,
53  const UT_StringView& salt,
54  int iterations);
55 
58 
60  const UT_StringHolder& message,
61  const UT_StringHolder& salt,
62  int iterations,
63  UT_StringHolder* salted_message = nullptr);
64 
65 /// Split a secure hash into its components so that it can be checked
66 /// against the raw message.
68  const UT_StringHolder& password,
69  UT_StringHolder& alg_string,
70  int& iterations,
71  UT_StringHolder& salt,
72  UT_StringHolder& hashed_password);
73 
74 #endif // __NET_HMAC_H__
GLuint GLsizei const GLchar * message
Definition: glcorearb.h:2543
NET_API bool NETpbkdf2_hmac(UT_WorkBuffer &output, const NET_DigestAlgorithm &alg, int key_len, const UT_StringView &input, const UT_StringView &salt, int iterations)
NET_API bool NETsecureRandom(UT_WorkBuffer &wbuf, int length)
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
#define NET_API
Definition: NET_API.h:9
A utility class to do read-only operations on a subset of an existing string.
Definition: UT_StringView.h:40
NET_API bool NEThmac(const NET_DigestAlgorithm &alg, const UT_StringView &input, const UT_StringView &key, UT_WorkBuffer &output, bool use_base64=true)
NET_API bool NETsplitSecureHash(const UT_StringHolder &password, UT_StringHolder &alg_string, int &iterations, UT_StringHolder &salt, UT_StringHolder &hashed_password)
NET_API UT_StringHolder NETsecureHash(const UT_StringHolder &message, const UT_StringHolder &salt, int iterations, UT_StringHolder *salted_message=nullptr)