HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NET_DigestAlgorithm.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_DigestAlgorithm.h
7  *
8  * COMMENTS:
9  *
10  *
11  */
12 
13 #ifndef __NET_DIGESTALGORITHM_H__
14 #define __NET_DIGESTALGORITHM_H__
15 
16 #include "NET_API.h"
17 
18 #include <UT/UT_NonCopyable.h>
19 #include <UT/UT_StringHolder.h>
20 
21 #include <cstdint>
22 
23 struct evp_md_st;
24 using EVP_MD = evp_md_st;
25 
27 {
28 public:
29  explicit NET_DigestAlgorithm(const EVP_MD* md) :
30  myMD(md)
31  {
32  }
33  explicit NET_DigestAlgorithm(int type);
34  explicit NET_DigestAlgorithm(const UT_StringRef& name);
35 
36  const EVP_MD* native() const;
37  int type() const;
38  const char* name() const;
39  int pkeyType() const;
40  exint size() const;
41  exint blockSize() const;
42  std::uint64_t flags() const;
43 
44 private:
45  const EVP_MD* myMD;
46 };
47 
48 /// Popular digest algorithms. NET_DigestAlgorithm can take in any digest that
49 /// the underyling encryption library supports. These are just a list of
50 /// commonly used digests.
52 {
53  SHA256,
54  SHA512
55 };
56 
63 
64 #endif // __NET_DIGESTALGORITHM_H__
GLbitfield flags
Definition: glcorearb.h:1596
int64 exint
Definition: SYS_Types.h:125
NET_DigestAlgorithmTypes
NET_API UT_StringHolder NETdigestAlgorithmToString(NET_DigestAlgorithmTypes types)
NET_API NET_DigestAlgorithm NETcreateDigestAlgorithm(NET_DigestAlgorithmTypes alg)
#define NET_API
Definition: NET_API.h:9
NET_DigestAlgorithm(const EVP_MD *md)
GLuint const GLchar * name
Definition: glcorearb.h:786
evp_md_st EVP_MD
GLsizeiptr size
Definition: glcorearb.h:664
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t blockSize(VULKAN_HPP_NAMESPACE::Format format)
GLsizei GLenum GLenum * types
Definition: glcorearb.h:2542
type
Definition: core.h:1059
NET_API NET_DigestAlgorithmTypes NETdigestAlgorithmFromString(const UT_StringRef &str)