winrt-Windows.Security.Cryptography.DataProtection 2.0.0b1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (16) hide show
  1. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/PKG-INFO +22 -0
  2. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/README.md +7 -0
  3. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/all-requirements.txt +4 -0
  4. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/py.Windows.Security.Cryptography.DataProtection.cpp +297 -0
  5. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/pyproject.toml +43 -0
  6. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/pywinrt-version.txt +1 -0
  7. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/requirements.txt +3 -0
  8. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/setup.cfg +4 -0
  9. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/setup.py +17 -0
  10. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/winrt/_winrt_windows_security_cryptography_dataprotection.pyi +28 -0
  11. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/winrt/windows/security/cryptography/dataprotection/__init__.py +10 -0
  12. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/winrt_Windows.Security.Cryptography.DataProtection.egg-info/PKG-INFO +22 -0
  13. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/winrt_Windows.Security.Cryptography.DataProtection.egg-info/SOURCES.txt +14 -0
  14. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/winrt_Windows.Security.Cryptography.DataProtection.egg-info/dependency_links.txt +1 -0
  15. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/winrt_Windows.Security.Cryptography.DataProtection.egg-info/requires.txt +5 -0
  16. winrt-Windows.Security.Cryptography.DataProtection-2.0.0b1/winrt_Windows.Security.Cryptography.DataProtection.egg-info/top_level.txt +1 -0
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: winrt-Windows.Security.Cryptography.DataProtection
3
+ Version: 2.0.0b1
4
+ Summary: Python projection of Windows Runtime (WinRT) APIs
5
+ License: MIT
6
+ Project-URL: Repository, https://github.com/pywrint/pywrinrt
7
+ Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: Implementation :: CPython
11
+ Classifier: Intended Audience :: Developers
12
+ Requires-Python: <3.13,>=3.9
13
+ Description-Content-Type: text/markdown
14
+ Provides-Extra: all
15
+
16
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
17
+
18
+ # winrt-Windows.Security.Cryptography.DataProtection
19
+
20
+ Windows Runtime (WinRT) APIs for for the `Windows.Security.Cryptography.DataProtection` namespace.
21
+
22
+ This package provides the `winrt.windows.security.cryptography.dataprotection` module.
@@ -0,0 +1,7 @@
1
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
2
+
3
+ # winrt-Windows.Security.Cryptography.DataProtection
4
+
5
+ Windows Runtime (WinRT) APIs for for the `Windows.Security.Cryptography.DataProtection` namespace.
6
+
7
+ This package provides the `winrt.windows.security.cryptography.dataprotection` module.
@@ -0,0 +1,4 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ winrt-Windows.Foundation[all]==2.0.0-beta.1
4
+ winrt-Windows.Storage.Streams[all]==2.0.0-beta.1
@@ -0,0 +1,297 @@
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ #include "py.Windows.Security.Cryptography.DataProtection.h"
4
+
5
+
6
+ namespace py::cpp::Windows::Security::Cryptography::DataProtection
7
+ {
8
+ // ----- DataProtectionProvider class --------------------
9
+
10
+ static PyObject* _new_DataProtectionProvider(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
11
+ {
12
+ if (kwds != nullptr)
13
+ {
14
+ py::set_invalid_kwd_args_error();
15
+ return nullptr;
16
+ }
17
+
18
+ auto arg_count = PyTuple_Size(args);
19
+ if (arg_count == 1)
20
+ {
21
+ try
22
+ {
23
+ auto param0 = py::convert_to<winrt::hstring>(args, 0);
24
+
25
+ winrt::Windows::Security::Cryptography::DataProtection::DataProtectionProvider instance{ param0 };
26
+ return py::wrap(instance, type);
27
+ }
28
+ catch (...)
29
+ {
30
+ py::to_PyErr();
31
+ return nullptr;
32
+ }
33
+ }
34
+ else if (arg_count == 0)
35
+ {
36
+ try
37
+ {
38
+ winrt::Windows::Security::Cryptography::DataProtection::DataProtectionProvider instance{ };
39
+ return py::wrap(instance, type);
40
+ }
41
+ catch (...)
42
+ {
43
+ py::to_PyErr();
44
+ return nullptr;
45
+ }
46
+ }
47
+ else
48
+ {
49
+ py::set_invalid_arg_count_error(arg_count);
50
+ return nullptr;
51
+ }
52
+ }
53
+
54
+ static void _dealloc_DataProtectionProvider(py::wrapper::Windows::Security::Cryptography::DataProtection::DataProtectionProvider* self) noexcept
55
+ {
56
+ auto tp = Py_TYPE(self);
57
+ std::destroy_at(&self->obj);
58
+ tp->tp_free(self);
59
+ Py_DECREF(tp);
60
+ }
61
+
62
+ static PyObject* DataProtectionProvider_ProtectAsync(py::wrapper::Windows::Security::Cryptography::DataProtection::DataProtectionProvider* self, PyObject* args) noexcept
63
+ {
64
+ auto arg_count = PyTuple_Size(args);
65
+
66
+ if (arg_count == 1)
67
+ {
68
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Cryptography.DataProtection.DataProtectionProvider", L"ProtectAsync", 1))
69
+ {
70
+ py::set_arg_count_version_error(1);
71
+ return nullptr;
72
+ }
73
+
74
+ try
75
+ {
76
+ auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 0);
77
+
78
+ return py::convert(self->obj.ProtectAsync(param0));
79
+ }
80
+ catch (...)
81
+ {
82
+ py::to_PyErr();
83
+ return nullptr;
84
+ }
85
+ }
86
+ else
87
+ {
88
+ py::set_invalid_arg_count_error(arg_count);
89
+ return nullptr;
90
+ }
91
+ }
92
+
93
+ static PyObject* DataProtectionProvider_ProtectStreamAsync(py::wrapper::Windows::Security::Cryptography::DataProtection::DataProtectionProvider* self, PyObject* args) noexcept
94
+ {
95
+ auto arg_count = PyTuple_Size(args);
96
+
97
+ if (arg_count == 2)
98
+ {
99
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Cryptography.DataProtection.DataProtectionProvider", L"ProtectStreamAsync", 2))
100
+ {
101
+ py::set_arg_count_version_error(2);
102
+ return nullptr;
103
+ }
104
+
105
+ try
106
+ {
107
+ auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IInputStream>(args, 0);
108
+ auto param1 = py::convert_to<winrt::Windows::Storage::Streams::IOutputStream>(args, 1);
109
+
110
+ return py::convert(self->obj.ProtectStreamAsync(param0, param1));
111
+ }
112
+ catch (...)
113
+ {
114
+ py::to_PyErr();
115
+ return nullptr;
116
+ }
117
+ }
118
+ else
119
+ {
120
+ py::set_invalid_arg_count_error(arg_count);
121
+ return nullptr;
122
+ }
123
+ }
124
+
125
+ static PyObject* DataProtectionProvider_UnprotectAsync(py::wrapper::Windows::Security::Cryptography::DataProtection::DataProtectionProvider* self, PyObject* args) noexcept
126
+ {
127
+ auto arg_count = PyTuple_Size(args);
128
+
129
+ if (arg_count == 1)
130
+ {
131
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Cryptography.DataProtection.DataProtectionProvider", L"UnprotectAsync", 1))
132
+ {
133
+ py::set_arg_count_version_error(1);
134
+ return nullptr;
135
+ }
136
+
137
+ try
138
+ {
139
+ auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 0);
140
+
141
+ return py::convert(self->obj.UnprotectAsync(param0));
142
+ }
143
+ catch (...)
144
+ {
145
+ py::to_PyErr();
146
+ return nullptr;
147
+ }
148
+ }
149
+ else
150
+ {
151
+ py::set_invalid_arg_count_error(arg_count);
152
+ return nullptr;
153
+ }
154
+ }
155
+
156
+ static PyObject* DataProtectionProvider_UnprotectStreamAsync(py::wrapper::Windows::Security::Cryptography::DataProtection::DataProtectionProvider* self, PyObject* args) noexcept
157
+ {
158
+ auto arg_count = PyTuple_Size(args);
159
+
160
+ if (arg_count == 2)
161
+ {
162
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Cryptography.DataProtection.DataProtectionProvider", L"UnprotectStreamAsync", 2))
163
+ {
164
+ py::set_arg_count_version_error(2);
165
+ return nullptr;
166
+ }
167
+
168
+ try
169
+ {
170
+ auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IInputStream>(args, 0);
171
+ auto param1 = py::convert_to<winrt::Windows::Storage::Streams::IOutputStream>(args, 1);
172
+
173
+ return py::convert(self->obj.UnprotectStreamAsync(param0, param1));
174
+ }
175
+ catch (...)
176
+ {
177
+ py::to_PyErr();
178
+ return nullptr;
179
+ }
180
+ }
181
+ else
182
+ {
183
+ py::set_invalid_arg_count_error(arg_count);
184
+ return nullptr;
185
+ }
186
+ }
187
+
188
+ static PyObject* _assign_array_DataProtectionProvider(PyObject* /*unused*/, PyObject* arg) noexcept
189
+ {
190
+ auto array = std::make_unique<py::ComArray<winrt::Windows::Security::Cryptography::DataProtection::DataProtectionProvider>>();
191
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
192
+ {
193
+ return nullptr;
194
+ }
195
+ Py_RETURN_NONE;
196
+ }
197
+
198
+ static PyObject* _from_DataProtectionProvider(PyObject* /*unused*/, PyObject* arg) noexcept
199
+ {
200
+ try
201
+ {
202
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
203
+ return py::convert(return_value.as<winrt::Windows::Security::Cryptography::DataProtection::DataProtectionProvider>());
204
+ }
205
+ catch (...)
206
+ {
207
+ py::to_PyErr();
208
+ return nullptr;
209
+ }
210
+ }
211
+
212
+ static PyMethodDef _methods_DataProtectionProvider[] = {
213
+ { "protect_async", reinterpret_cast<PyCFunction>(DataProtectionProvider_ProtectAsync), METH_VARARGS, nullptr },
214
+ { "protect_stream_async", reinterpret_cast<PyCFunction>(DataProtectionProvider_ProtectStreamAsync), METH_VARARGS, nullptr },
215
+ { "unprotect_async", reinterpret_cast<PyCFunction>(DataProtectionProvider_UnprotectAsync), METH_VARARGS, nullptr },
216
+ { "unprotect_stream_async", reinterpret_cast<PyCFunction>(DataProtectionProvider_UnprotectStreamAsync), METH_VARARGS, nullptr },
217
+ { "_assign_array_", _assign_array_DataProtectionProvider, METH_O | METH_STATIC, nullptr },
218
+ { "_from", reinterpret_cast<PyCFunction>(_from_DataProtectionProvider), METH_O | METH_STATIC, nullptr },
219
+ { }
220
+ };
221
+
222
+ static PyGetSetDef _getset_DataProtectionProvider[] = {
223
+ { }
224
+ };
225
+
226
+ static PyType_Slot _type_slots_DataProtectionProvider[] =
227
+ {
228
+ { Py_tp_new, reinterpret_cast<void*>(_new_DataProtectionProvider) },
229
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_DataProtectionProvider) },
230
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_DataProtectionProvider) },
231
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_DataProtectionProvider) },
232
+ { },
233
+ };
234
+
235
+ static PyType_Spec type_spec_DataProtectionProvider =
236
+ {
237
+ "winrt._winrt_windows_security_cryptography_dataprotection.DataProtectionProvider",
238
+ sizeof(py::wrapper::Windows::Security::Cryptography::DataProtection::DataProtectionProvider),
239
+ 0,
240
+ Py_TPFLAGS_DEFAULT,
241
+ _type_slots_DataProtectionProvider
242
+ };
243
+
244
+ // ----- Windows.Security.Cryptography.DataProtection Initialization --------------------
245
+ PyDoc_STRVAR(module_doc, "Windows::Security::Cryptography::DataProtection");
246
+
247
+
248
+ static PyModuleDef module_def
249
+ = {PyModuleDef_HEAD_INIT,
250
+ "_winrt_windows_security_cryptography_dataprotection",
251
+ module_doc,
252
+ 0,
253
+ nullptr,
254
+ nullptr,
255
+ nullptr,
256
+ nullptr,
257
+ nullptr};
258
+
259
+ } // py::cpp::Windows::Security::Cryptography::DataProtection
260
+
261
+ PyMODINIT_FUNC PyInit__winrt_windows_security_cryptography_dataprotection(void) noexcept
262
+ {
263
+ using namespace py::cpp::Windows::Security::Cryptography::DataProtection;
264
+
265
+ if (py::import_winrt_runtime() == -1)
266
+ {
267
+ return nullptr;
268
+ }
269
+
270
+ py::pyobj_handle module{PyModule_Create(&module_def)};
271
+
272
+ if (!module)
273
+ {
274
+ return nullptr;
275
+ }
276
+
277
+ auto object_type = py::get_object_type();
278
+ if (!object_type)
279
+ {
280
+ return nullptr;
281
+ }
282
+
283
+ py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
284
+
285
+ if (!object_bases)
286
+ {
287
+ return nullptr;
288
+ }
289
+
290
+ if (py::register_python_type(module.get(), &type_spec_DataProtectionProvider, object_bases.get(), nullptr) == -1)
291
+ {
292
+ return nullptr;
293
+ }
294
+
295
+
296
+ return module.detach();
297
+ }
@@ -0,0 +1,43 @@
1
+ # WARNING: Please don't edit this file. It was automatically generated.
2
+
3
+ [build-system]
4
+ requires = ["setuptools", "setuptools-scm", "winrt-sdk"]
5
+ build-backend = "setuptools.build_meta"
6
+
7
+ [project]
8
+ name = "winrt-Windows.Security.Cryptography.DataProtection"
9
+ description = "Python projection of Windows Runtime (WinRT) APIs"
10
+ readme = "README.md"
11
+ license = { text = "MIT" }
12
+ classifiers = [
13
+ "Operating System :: Microsoft :: Windows",
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: Implementation :: CPython",
16
+ "Intended Audience :: Developers",
17
+ ]
18
+ dynamic = ["version", "dependencies", "optional-dependencies"]
19
+ requires-python = ">=3.9,<3.13"
20
+
21
+ [project.urls]
22
+ # Homepage = "https://github.com/pywrint/pywrinrt"
23
+ # Documentation = "https://readthedocs.org"
24
+ Repository = "https://github.com/pywrint/pywrinrt"
25
+ Changelog = "https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md"
26
+
27
+ [tool.setuptools.dynamic]
28
+ version = { file = "pywinrt-version.txt" }
29
+ dependencies = { file = "requirements.txt" }
30
+ optional-dependencies.all = { file = "all-requirements.txt" }
31
+
32
+ [tool.cibuildwheel]
33
+ # use local winrt-sdk build dependency
34
+ environment = { PYTHONPATH="../winrt-sdk/src" }
35
+ # don't install winrt-sdk from PyPI
36
+ build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
37
+ # don't build for PyPy
38
+ skip = "pp*"
39
+ # suppress warnings about ARM64 testing
40
+ test-skip = "*-win_arm64"
41
+
42
+ [tool.cibuildwheel.windows]
43
+ archs = ["x86", "AMD64", "ARM64"]
@@ -0,0 +1,3 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ winrt-runtime==2.0.0-beta.1
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,17 @@
1
+ # WARNING: Please don't edit this file. It was automatically generated.
2
+
3
+ from setuptools import Extension, setup
4
+ from winrt_sdk import get_include_dirs
5
+
6
+ setup(
7
+ ext_modules=[
8
+ Extension(
9
+ "winrt._winrt_windows_security_cryptography_dataprotection",
10
+ sources=["py.Windows.Security.Cryptography.DataProtection.cpp"],
11
+ include_dirs=get_include_dirs(),
12
+ extra_compile_args=["/std:c++20", "/permissive-"],
13
+ libraries=["windowsapp"],
14
+ )
15
+ ],
16
+ package_data={"winrt": ["*.pyi"]},
17
+ )
@@ -0,0 +1,28 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ import datetime
4
+ import sys
5
+ import types
6
+ import typing
7
+ import uuid as _uuid
8
+ from builtins import property as _property
9
+
10
+ import winrt._winrt
11
+ import winrt.system
12
+ import winrt.windows.foundation
13
+ import winrt.windows.storage.streams
14
+
15
+ Self = typing.TypeVar('Self')
16
+
17
+ class DataProtectionProvider(winrt.system.Object):
18
+ @staticmethod
19
+ def _from(obj: winrt.system.Object, /) -> DataProtectionProvider: ...
20
+ @typing.overload
21
+ def __new__(cls: typing.Type[DataProtectionProvider], protection_descriptor: str) -> DataProtectionProvider:...
22
+ @typing.overload
23
+ def __new__(cls: typing.Type[DataProtectionProvider]) -> DataProtectionProvider:...
24
+ def protect_async(self, data: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> winrt.windows.foundation.IAsyncOperation[winrt.windows.storage.streams.IBuffer]: ...
25
+ def protect_stream_async(self, src: typing.Optional[winrt.windows.storage.streams.IInputStream], dest: typing.Optional[winrt.windows.storage.streams.IOutputStream], /) -> winrt.windows.foundation.IAsyncAction: ...
26
+ def unprotect_async(self, data: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> winrt.windows.foundation.IAsyncOperation[winrt.windows.storage.streams.IBuffer]: ...
27
+ def unprotect_stream_async(self, src: typing.Optional[winrt.windows.storage.streams.IInputStream], dest: typing.Optional[winrt.windows.storage.streams.IOutputStream], /) -> winrt.windows.foundation.IAsyncAction: ...
28
+
@@ -0,0 +1,10 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ import winrt.system
4
+ from winrt import _winrt_windows_security_cryptography_dataprotection
5
+
6
+ __all__ = [
7
+ "DataProtectionProvider",
8
+ ]
9
+
10
+ DataProtectionProvider = _winrt_windows_security_cryptography_dataprotection.DataProtectionProvider
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: winrt-Windows.Security.Cryptography.DataProtection
3
+ Version: 2.0.0b1
4
+ Summary: Python projection of Windows Runtime (WinRT) APIs
5
+ License: MIT
6
+ Project-URL: Repository, https://github.com/pywrint/pywrinrt
7
+ Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: Implementation :: CPython
11
+ Classifier: Intended Audience :: Developers
12
+ Requires-Python: <3.13,>=3.9
13
+ Description-Content-Type: text/markdown
14
+ Provides-Extra: all
15
+
16
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
17
+
18
+ # winrt-Windows.Security.Cryptography.DataProtection
19
+
20
+ Windows Runtime (WinRT) APIs for for the `Windows.Security.Cryptography.DataProtection` namespace.
21
+
22
+ This package provides the `winrt.windows.security.cryptography.dataprotection` module.
@@ -0,0 +1,14 @@
1
+ README.md
2
+ all-requirements.txt
3
+ py.Windows.Security.Cryptography.DataProtection.cpp
4
+ pyproject.toml
5
+ pywinrt-version.txt
6
+ requirements.txt
7
+ setup.py
8
+ winrt/_winrt_windows_security_cryptography_dataprotection.pyi
9
+ winrt/windows/security/cryptography/dataprotection/__init__.py
10
+ winrt_Windows.Security.Cryptography.DataProtection.egg-info/PKG-INFO
11
+ winrt_Windows.Security.Cryptography.DataProtection.egg-info/SOURCES.txt
12
+ winrt_Windows.Security.Cryptography.DataProtection.egg-info/dependency_links.txt
13
+ winrt_Windows.Security.Cryptography.DataProtection.egg-info/requires.txt
14
+ winrt_Windows.Security.Cryptography.DataProtection.egg-info/top_level.txt
@@ -0,0 +1,5 @@
1
+ winrt-runtime==2.0.0-beta.1
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.0.0-beta.1
5
+ winrt-Windows.Storage.Streams[all]==2.0.0-beta.1