HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NET_Digest.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_Digest.h
7  *
8  * COMMENTS:
9  *
10  *
11  */
12 
13 #ifndef __NET_DIGEST_H__
14 #define __NET_DIGEST_H__
15 
16 #include "NET_API.h"
17 
18 #include "NET_DigestAlgorithm.h"
19 
20 #include <UT/UT_Array.h>
21 #include <UT/UT_NonCopyable.h>
22 
23 struct evp_md_ctx_st;
24 using EVP_MD_CTX = evp_md_ctx_st;
25 
26 class NET_API NET_Digest final
27 {
28 public:
29  NET_Digest();
30  ~NET_Digest();
32 
33  void initialize(const NET_DigestAlgorithm& alg);
34  void update(const void* data, std::size_t len);
35  unsigned int finalize(unsigned char* data, unsigned int len);
36  UT_Array<unsigned char> finalize();
37  NET_DigestAlgorithm algorithm() const;
38 private:
39  EVP_MD_CTX* myCtx;
40 };
41 
42 #endif // __NET_DIGEST_H__
43 
evp_md_ctx_st EVP_MD_CTX
Definition: NET_Digest.h:24
#define NET_API
Definition: NET_API.h:9
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
OPENVDB_API void initialize()
Global registration of native Grid, Transform, Metadata and Point attribute types. Also initializes blosc (if enabled).
Definition: logging.h:294
Definition: format.h:895