This repository has been archived by the owner on Jul 26, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 220
/
BCrypt+BCRYPT_ALGORITHM_IDENTIFIER.cs
52 lines (46 loc) · 1.99 KB
/
BCrypt+BCRYPT_ALGORITHM_IDENTIFIER.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright © .NET Foundation and Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace PInvoke
{
using System.Runtime.InteropServices;
/// <content>
/// Contains the <see cref="BCRYPT_ALGORITHM_IDENTIFIER"/> nested type.
/// </content>
public partial class BCrypt
{
/// <summary>
/// Used with the <see cref="BCryptEnumAlgorithms(AlgorithmOperations, out int, out BCRYPT_ALGORITHM_IDENTIFIER*, BCryptEnumAlgorithmsFlags)"/> function to contain a cryptographic algorithm identifier.
/// </summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
[OfferIntPtrPropertyAccessors]
public unsafe partial struct BCRYPT_ALGORITHM_IDENTIFIER
{
/// <summary>
/// A pointer to a null-terminated Unicode string that contains the string identifier of the algorithm. The <see cref="AlgorithmIdentifiers"/> class contains the predefined algorithm identifiers.
/// </summary>
public char* pszName;
/// <summary>
/// Specifies the class of the algorithm.
/// </summary>
public InterfaceIdentifiers dwClass;
/// <summary>
/// A set of flags that specify other information about the algorithm.
/// </summary>
public Flags dwFlags;
/// <summary>
/// Flags for the <see cref="dwFlags"/> field.
/// </summary>
public enum Flags : uint
{
/// <summary>
/// No flags.
/// </summary>
None = 0,
}
/// <summary>
/// Gets the string identifier of the algorithm. The <see cref="AlgorithmIdentifiers"/> class contains the predefined algorithm identifiers.
/// </summary>
public string Name => new string(this.pszName);
}
}
}