Loading...
Searching...
No Matches
DigestAlgorithm.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software 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
14namespace pdftron { namespace Crypto {
15
16
18{
19public:
20 //enums:
29
37 static std::vector<UChar> CalculateDigest(DigestAlgorithm::Type in_digest_algorithm_type, const std::vector<UChar>& in_message_buf);
38
48 static std::vector<UChar> SignDigest(const std::vector<UChar>& digest_buf, const DigestAlgorithm::Type digest_algorithm_type, const UString pkcs12_keyfile_path, const UString pkcs12_password);
49
59 static std::vector<UChar> SignDigest(const std::vector<UChar>& digest_buf, const DigestAlgorithm::Type digest_algorithm_type, const std::vector<UChar>& pkcs12_buf, const UString pkcs12_password);
60#ifndef SWIG
69 static std::vector<UChar> CalculateDigest(DigestAlgorithm::Type in_digest_algorithm_type, const UChar* in_message_buf, const size_t in_message_buf_size);
70
81 static std::vector<UChar> SignDigest(const UChar* digest_buf, const size_t digest_buf_size, const DigestAlgorithm::Type digest_algorithm_type, const UString pkcs12_keyfile_path, const UString pkcs12_password);
82
94 static std::vector<UChar> SignDigest(const UChar* digest_buf, const size_t digest_buf_size, const DigestAlgorithm::Type digest_algorithm_type, const UChar* pkcs12_buf, const size_t pkcs12_buf_size, const UString pkcs12_password);
95#endif
96};
97
98#include <Impl/DigestAlgorithm.inl>
99} //end Crypto
100} //end pdftron
101
102
103#endif //PDFTRON_H_CPPPDFDigestAlgorithm
static std::vector< UChar > CalculateDigest(DigestAlgorithm::Type in_digest_algorithm_type, const UChar *in_message_buf, const size_t in_message_buf_size)
static std::vector< UChar > SignDigest(const std::vector< UChar > &digest_buf, const DigestAlgorithm::Type digest_algorithm_type, const UString pkcs12_keyfile_path, const UString pkcs12_password)
static std::vector< UChar > SignDigest(const std::vector< UChar > &digest_buf, const DigestAlgorithm::Type digest_algorithm_type, const std::vector< UChar > &pkcs12_buf, const UString pkcs12_password)
static std::vector< UChar > CalculateDigest(DigestAlgorithm::Type in_digest_algorithm_type, const std::vector< UChar > &in_message_buf)
static std::vector< UChar > SignDigest(const UChar *digest_buf, const size_t digest_buf_size, const DigestAlgorithm::Type digest_algorithm_type, const UChar *pkcs12_buf, const size_t pkcs12_buf_size, const UString pkcs12_password)
static std::vector< UChar > SignDigest(const UChar *digest_buf, const size_t digest_buf_size, const DigestAlgorithm::Type digest_algorithm_type, const UString pkcs12_keyfile_path, const UString pkcs12_password)
TRN_UChar UChar
Definition BasicTypes.h:12