All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DigestAlgorithm.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2022 by PDFTron Systems Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 
6 #ifndef PDFTRON_H_CPPPDFDigestAlgorithm
7 #define PDFTRON_H_CPPPDFDigestAlgorithm
8 #include <C/Crypto/TRN_DigestAlgorithm.h>
9 
10 #include <Common/BasicTypes.h>
11 #include <Common/UString.h>
12 #include <PDF/PDFDoc.h>
13 
14 namespace pdftron { namespace Crypto {
15 
16 
18 {
19 public:
20  //enums:
21  enum Type {
22  e_SHA1 = 0,
23  e_SHA256 = 1,
24  e_SHA384 = 2,
25  e_SHA512 = 3,
28  };
29 
37  static std::vector<UChar> CalculateDigest(DigestAlgorithm::Type in_digest_algorithm_type, const std::vector<UChar>& in_message_buf);
38 #ifndef SWIG
39 
47  static std::vector<UChar> CalculateDigest(DigestAlgorithm::Type in_digest_algorithm_type, const UChar* in_message_buf, const size_t in_message_buf_size);
48 #endif
49 };
50 
51 #include <Impl/DigestAlgorithm.inl>
52 } //end Crypto
53 } //end pdftron
54 
55 
56 #endif //PDFTRON_H_CPPPDFDigestAlgorithm
static std::vector< UChar > CalculateDigest(DigestAlgorithm::Type in_digest_algorithm_type, const std::vector< UChar > &in_message_buf)
TRN_UChar UChar
Definition: BasicTypes.h:12