dxgi: Fix a typo in a comment.
[wine.git] / include / windows.security.cryptography.idl
blob7d7b7fba2dc5c744a76f5d9e26ba948eeaa5b8fa
1 /*
2 * Copyright 2022 Nikolay Sivov for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifdef __WIDL__
20 #pragma winrt ns_prefix
21 #endif
23 import "inspectable.idl";
24 import "asyncinfo.idl";
25 import "windowscontracts.idl";
26 import "windows.foundation.idl";
27 import "windows.storage.streams.idl";
29 namespace Windows.Security.Cryptography
31 typedef enum BinaryStringEncoding BinaryStringEncoding;
32 runtimeclass CryptographicBuffer;
35 contract(Windows.Foundation.UniversalApiContract, 1.0)
37 enum BinaryStringEncoding
39 Utf8 = 0,
40 Utf16LE = 1,
41 Utf16BE = 2,
45 contract(Windows.Foundation.UniversalApiContract, 1.0),
46 exclusiveto(Windows.Security.Cryptography.CryptographicBuffer),
47 uuid(320b7e22-3cb0-4cdf-8663-1d28910065eb)
49 interface ICryptographicBufferStatics : IInspectable
51 HRESULT Compare(
52 [in] Windows.Storage.Streams.IBuffer *object1,
53 [in] Windows.Storage.Streams.IBuffer *object2,
54 [out, retval] boolean *is_equal
56 HRESULT GenerateRandom(
57 [in] UINT32 length,
58 [out, retval] Windows.Storage.Streams.IBuffer **buffer
60 HRESULT GenerateRandomNumber(
61 [out, retval] UINT32 *value
63 HRESULT CreateFromByteArray(
64 [in] UINT32 value_size,
65 [in, size_is(value_size)] BYTE *value,
66 [out, retval] Windows.Storage.Streams.IBuffer **buffer
68 HRESULT CopyToByteArray(
69 [in] Windows.Storage.Streams.IBuffer *buffer,
70 [out] UINT32 *value_size,
71 [out, size_is(, *value_size)] BYTE **value
73 HRESULT DecodeFromHexString(
74 [in] HSTRING value,
75 [out, retval] Windows.Storage.Streams.IBuffer **buffer
77 HRESULT EncodeToHexString(
78 [in] Windows.Storage.Streams.IBuffer *buffer,
79 [out, retval] HSTRING *value
81 HRESULT DecodeFromBase64String(
82 [in] HSTRING value,
83 [out, retval] Windows.Storage.Streams.IBuffer **buffer
85 HRESULT EncodeToBase64String(
86 [in] Windows.Storage.Streams.IBuffer *buffer,
87 [out, retval] HSTRING *value
89 HRESULT ConvertStringToBinary(
90 [in] HSTRING value,
91 [in] Windows.Security.Cryptography.BinaryStringEncoding encoding,
92 [out, retval] Windows.Storage.Streams.IBuffer **buffer
94 HRESULT ConvertBinaryToString(
95 [in] Windows.Security.Cryptography.BinaryStringEncoding encoding,
96 [in] Windows.Storage.Streams.IBuffer *buffer,
97 [out, retval] HSTRING *value
102 contract(Windows.Foundation.UniversalApiContract, 1.0),
103 marshaling_behavior(agile),
104 static(Windows.Security.Cryptography.ICryptographicBufferStatics, Windows.Foundation.UniversalApiContract, 1.0),
105 threading(both)
107 runtimeclass CryptographicBuffer