libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
CryptEncrypt.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
26namespace introvirt {
27namespace windows {
28namespace advapi32 {
29
35class CryptEncrypt final : public WindowsFunctionCall {
36 public:
37 HCRYPTKEY hKey() const;
39
42
43 bool Final() const;
44 void Final(bool Final);
45
46 uint32_t dwFlags() const;
47 void dwFlags(uint32_t dwFlags);
48
50 void pbData(const guest_ptr<uint8_t[]>& pbData);
51
54
55 uint32_t dwBufLen() const;
56 void dwBufLen(uint32_t dwBufLen);
57
58 const std::string& function_name() const override;
59 const std::string& library_name() const override;
60 void write(std::ostream& os = std::cout) const override;
61 Json::Value json() const override;
62
63 bool result() const;
64 void result(bool result);
65
67 ~CryptEncrypt() override;
68
69 /* Injection helper */
70 static bool inject(HCRYPTKEY hKey, HCRYPTHASH hHash, bool Final, uint32_t dwFlags,
71 const guest_ptr<uint8_t[]>& pbData, const guest_ptr<uint32_t>& pdwDataLen,
72 uint32_t dwBufLen);
73
74 static constexpr int ArgumentCount = 7;
75 inline static const std::string LibraryName = "advapi32";
76 inline static const std::string FunctionName = "CryptEncrypt";
77
78 private:
79 /* Injection constructor */
81 const guest_ptr<uint8_t[]>& pbData, const guest_ptr<uint32_t>& pdwDataLen,
82 uint32_t dwBufLen);
83
84 private:
85 HCRYPTKEY hKey_;
86 HCRYPTHASH hHash_;
87 bool Final_;
88 uint32_t dwFlags_;
89 guest_ptr<void> pbData_;
90 mutable guest_ptr<uint32_t> pdwDataLen_;
91 uint32_t dwBufLen_;
92};
93
94} // namespace advapi32
95} // namespace windows
96} // 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 advapi32!CryptEncrypt.
Definition CryptEncrypt.hh:35
const std::string & library_name() const override
Get the name of the library this call is for.
guest_ptr< uint8_t[]> pbData() const
const std::string & function_name() const override
Get the function name.
void pbData(const guest_ptr< uint8_t[]> &pbData)
void write(std::ostream &os=std::cout) const override
Write out a textual representation of the function for display.
void pdwDataLen(const guest_ptr< uint32_t > &pdwDataLen)
static const std::string FunctionName
Definition CryptEncrypt.hh:76
guest_ptr< uint32_t > pdwDataLen() const
Json::Value json() const override
Get the function as Json.
static const std::string LibraryName
Definition CryptEncrypt.hh:75
static bool inject(HCRYPTKEY hKey, HCRYPTHASH hHash, bool Final, uint32_t dwFlags, const guest_ptr< uint8_t[]> &pbData, const guest_ptr< uint32_t > &pdwDataLen, uint32_t dwBufLen)
static constexpr int ArgumentCount
Definition CryptEncrypt.hh:74
Type-safe guest virtual address pointer and guest_ptr template.
Core IntroVirt classes.
Definition Cr0.hh:20