HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NET_Utils.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_Utils.h
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef __NET_UTILS_H__
13 #define __NET_UTILS_H__
14 
15 #include "NET_API.h"
16 
17 #include <UT/UT_JSONWriter.h>
18 #include <UT/UT_StringHolder.h>
19 #include <UT/UT_UniquePtr.h>
20 
21 class UT_NetSocket;
22 class UT_WorkBuffer;
23 class UT_IpAddressV4;
24 
25 enum class NET_DigestAlgorithmTypes;
26 
27 /// Determine the default CA Path used by Houdini
29 
30 /// Determine the default CA Info path used by Houdini
32 
34  UT_NetSocket *sock,
35  UT_IpAddressV4& local_ip,
36  UT_IpAddressV4& remote_ip);
37 
39  const UT_IpAddressV4& server_ip,
40  const UT_IpAddressV4& client_ip,
41  const char *ipmask);
42 
44 
46 
48 
49 /// Remove any dot segments present in the provided url path.
51 
52 /// HTML escape text to ensure security saftey.
54 
55 /// Split a stored password into its components so that it can be checked
56 /// against with raw passwords.
58  const UT_StringHolder& password,
59  UT_StringHolder& alg_string,
60  int& iterations,
61  UT_StringHolder& salt,
62  UT_StringHolder& hashed_password);
63 
65  const UT_StringView& user_agent,
66  UT_StringHolder* version = nullptr,
67  UT_StringHolder* platform = nullptr);
68 
69 #endif // __NET_UTILS_H__
NET_API void NETparseUserAgent(const UT_StringView &user_agent, UT_StringHolder *version=nullptr, UT_StringHolder *platform=nullptr)
This represents a Ipv4 address.
Definition: UT_IpAddress.h:34
NET_API UT_StringHolder NETdetermineCAInfo()
Determine the default CA Info path used by Houdini.
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
NET_DigestAlgorithmTypes
NET_API UT_UniquePtr< UT_JSONWriter > NETcreateJSONWriter(UT_WorkBuffer &content)
NET_API UT_StringHolder NETremoveDotSegmentsInUrlPath(const UT_StringRef &p)
Remove any dot segments present in the provided url path.
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
#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:39
NET_API UT_StringHolder NEThtmlEscape(const UT_StringHolder &name)
HTML escape text to ensure security saftey.
GLuint const GLchar * name
Definition: glcorearb.h:786
GT_API const UT_StringHolder version
NET_API UT_StringHolder NETdetermineCAPath()
Determine the default CA Path used by Houdini.
NET_API bool NETmatchIPMask(const UT_IpAddressV4 &server_ip, const UT_IpAddressV4 &client_ip, const char *ipmask)
NET_API void NETgetLocalAndRemoteIPs(UT_NetSocket *sock, UT_IpAddressV4 &local_ip, UT_IpAddressV4 &remote_ip)
NET_API UT_StringHolder NEThttpDate()
NET_API UT_StringHolder NETgenerateRandomString(int length)
NET_API bool NETsplitPassword(const UT_StringHolder &password, UT_StringHolder &alg_string, int &iterations, UT_StringHolder &salt, UT_StringHolder &hashed_password)