libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
CryptEncryptMessage.hh
Go to the documentation of this file.
1/*
2 * Copyright 2021 Assured Information Security, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16/* This file is automatically generated. Do not edit. */
17#pragma once
18
19#include <cstdint>
23#include <ostream>
24#include <string>
25#include <vector>
26
27namespace introvirt {
28namespace windows {
29namespace crypt32 {
30
37 public:
40
41 uint32_t cRecipientCert() const;
43
46 std::vector<std::shared_ptr<CERT_CONTEXT>>& RecipientCert();
47
49 void pbToBeEncrypted(const guest_ptr<uint8_t[]>& pbToBeEncrypted);
50
51 uint32_t cbToBeEncrypted() const;
53
55 void pbEncryptedBlob(const guest_ptr<uint8_t[]>& pbEncryptedBlob);
56
59
60 const std::string& function_name() const override;
61 const std::string& library_name() const override;
62 void write(std::ostream& os = std::cout) const override;
63 Json::Value json() const override;
64
65 bool result() const;
66 void result(bool result);
67
70
71 /* Injection helper */
72 static bool inject(const guest_ptr<void>& pEncryptPara, uint32_t cRecipientCert,
73 const guest_ptr<void*[], guest_ptr_t>& rgpRecipientCert,
74 const guest_ptr<uint8_t[]>& pbToBeEncrypted, uint32_t cbToBeEncrypted,
75 const guest_ptr<uint8_t[]>& pbEncryptedBlob,
77
78 static constexpr int ArgumentCount = 7;
79 inline static const std::string LibraryName = "crypt32";
80 inline static const std::string FunctionName = "CryptEncryptMessage";
81
82 private:
83 /* Injection constructor */
85 const guest_ptr<void*[], guest_ptr_t>& rgpRecipientCert,
86 const guest_ptr<uint8_t[]>& pbToBeEncrypted, uint32_t cbToBeEncrypted,
87 const guest_ptr<uint8_t[]>& pbEncryptedBlob,
89
90 private:
91 mutable guest_ptr<void> pEncryptPara_;
92 uint32_t cRecipientCert_;
93 guest_ptr<void*[], guest_ptr_t> rgpRecipientCert_;
94 mutable std::vector<std::shared_ptr<CERT_CONTEXT>> RecipientCert_;
95 guest_ptr<void> pbToBeEncrypted_;
96 uint32_t cbToBeEncrypted_;
97 guest_ptr<void> pbEncryptedBlob_;
98 mutable guest_ptr<uint32_t> pcbEncryptedBlob_;
99};
100
101} // namespace crypt32
102} // namespace windows
103} // namespace introvirt
Interface class for hypervisor events.
Definition Event.hh:43
Definition guest_ptr.hh:88
Helper class to transparently convert between guest size and a value.
Definition guest_size_t_ptr.hh:498
Definition WindowsFunctionCall.hh:31
Handler for crypt32!CryptEncryptMessage.
Definition CryptEncryptMessage.hh:36
void pbToBeEncrypted(const guest_ptr< uint8_t[]> &pbToBeEncrypted)
guest_ptr< uint8_t[]> pbToBeEncrypted() const
void write(std::ostream &os=std::cout) const override
Write out a textual representation of the function for display.
guest_ptr< void *[], guest_ptr_t > rgpRecipientCert() const
void pcbEncryptedBlob(const guest_ptr< uint32_t > &pcbEncryptedBlob)
static bool inject(const guest_ptr< void > &pEncryptPara, uint32_t cRecipientCert, const guest_ptr< void *[], guest_ptr_t > &rgpRecipientCert, const guest_ptr< uint8_t[]> &pbToBeEncrypted, uint32_t cbToBeEncrypted, const guest_ptr< uint8_t[]> &pbEncryptedBlob, const guest_ptr< uint32_t > &pcbEncryptedBlob)
void pEncryptPara(const guest_ptr< void > &pEncryptPara)
const std::string & function_name() const override
Get the function name.
static constexpr int ArgumentCount
Definition CryptEncryptMessage.hh:78
std::vector< std::shared_ptr< CERT_CONTEXT > > & RecipientCert()
void cRecipientCert(uint32_t cRecipientCert)
guest_ptr< uint32_t > pcbEncryptedBlob() const
void rgpRecipientCert(const guest_ptr< void *[], guest_ptr_t > &rgpRecipientCert)
static const std::string LibraryName
Definition CryptEncryptMessage.hh:79
static const std::string FunctionName
Definition CryptEncryptMessage.hh:80
const std::string & library_name() const override
Get the name of the library this call is for.
void cbToBeEncrypted(uint32_t cbToBeEncrypted)
Json::Value json() const override
Get the function as Json.
void pbEncryptedBlob(const guest_ptr< uint8_t[]> &pbEncryptedBlob)
guest_ptr< uint8_t[]> pbEncryptedBlob() const
Type-safe guest virtual address pointer and guest_ptr template.
Core IntroVirt classes.
Definition Cr0.hh:20