Files
2026-06-04 11:42:34 +02:00

195 lines
7.2 KiB
C#

using System;
using System.Runtime.InteropServices;
using System.Security.AccessControl;
namespace System.Security.Cryptography
{
/// <summary>Provides additional information about a cryptographic key pair. This class cannot be inherited.</summary>
// Token: 0x020004F3 RID: 1267
[ComVisible(true)]
public sealed class CspKeyContainerInfo
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CspKeyContainerInfo" /> class using the specified parameters.</summary>
/// <param name="parameters">A <see cref="T:System.Security.Cryptography.CspParameters" /> object that provides information about the key.</param>
// Token: 0x06002ED8 RID: 11992 RVA: 0x00096B08 File Offset: 0x00094D08
public CspKeyContainerInfo(CspParameters parameters)
{
this._params = parameters;
this._random = true;
}
/// <summary>Gets a value indicating whether a key in a key container is accessible.</summary>
/// <returns>true if the key is accessible; otherwise, false.</returns>
/// <exception cref="T:System.NotSupportedException">The key type is not supported.</exception>
// Token: 0x1700093A RID: 2362
// (get) Token: 0x06002ED9 RID: 11993 RVA: 0x00096B20 File Offset: 0x00094D20
public bool Accessible
{
get
{
return true;
}
}
/// <summary>Gets a <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object that represents access rights and audit rules for a container. </summary>
/// <returns>A <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object that represents access rights and audit rules for a container.</returns>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key type is not supported.</exception>
/// <exception cref="T:System.NotSupportedException">The cryptographic service provider cannot be found.-or-The key container was not found.</exception>
// Token: 0x1700093B RID: 2363
// (get) Token: 0x06002EDA RID: 11994 RVA: 0x00096B24 File Offset: 0x00094D24
public CryptoKeySecurity CryptoKeySecurity
{
get
{
return null;
}
}
/// <summary>Gets a value indicating whether a key can be exported from a key container.</summary>
/// <returns>true if the key can be exported; otherwise, false.</returns>
/// <exception cref="T:System.NotSupportedException">The key type is not supported.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider cannot be found.-or-The key container was not found.</exception>
// Token: 0x1700093C RID: 2364
// (get) Token: 0x06002EDB RID: 11995 RVA: 0x00096B28 File Offset: 0x00094D28
public bool Exportable
{
get
{
return true;
}
}
/// <summary>Gets a value indicating whether a key is a hardware key.</summary>
/// <returns>true if the key is a hardware key; otherwise, false.</returns>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider cannot be found.</exception>
// Token: 0x1700093D RID: 2365
// (get) Token: 0x06002EDC RID: 11996 RVA: 0x00096B2C File Offset: 0x00094D2C
public bool HardwareDevice
{
get
{
return false;
}
}
/// <summary>Gets a key container name.</summary>
/// <returns>The key container name.</returns>
// Token: 0x1700093E RID: 2366
// (get) Token: 0x06002EDD RID: 11997 RVA: 0x00096B30 File Offset: 0x00094D30
public string KeyContainerName
{
get
{
return this._params.KeyContainerName;
}
}
/// <summary>Gets a value that describes whether an asymmetric key was created as a signature key or an exchange key.</summary>
/// <returns>One of the <see cref="T:System.Security.Cryptography.KeyNumber" /> values that describes whether an asymmetric key was created as a signature key or an exchange key.</returns>
// Token: 0x1700093F RID: 2367
// (get) Token: 0x06002EDE RID: 11998 RVA: 0x00096B40 File Offset: 0x00094D40
public KeyNumber KeyNumber
{
get
{
return (KeyNumber)this._params.KeyNumber;
}
}
/// <summary>Gets a value indicating whether a key is from a machine key set.</summary>
/// <returns>true if the key is from the machine key set; otherwise, false.</returns>
// Token: 0x17000940 RID: 2368
// (get) Token: 0x06002EDF RID: 11999 RVA: 0x00096B50 File Offset: 0x00094D50
public bool MachineKeyStore
{
get
{
return false;
}
}
/// <summary>Gets a value indicating whether a key pair is protected.</summary>
/// <returns>true if the key pair is protected; otherwise, false.</returns>
/// <exception cref="T:System.NotSupportedException">The key type is not supported.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider cannot be found.-or-The key container was not found.</exception>
// Token: 0x17000941 RID: 2369
// (get) Token: 0x06002EE0 RID: 12000 RVA: 0x00096B54 File Offset: 0x00094D54
public bool Protected
{
get
{
return false;
}
}
/// <summary>Gets the provider name of a key.</summary>
/// <returns>The provider name.</returns>
// Token: 0x17000942 RID: 2370
// (get) Token: 0x06002EE1 RID: 12001 RVA: 0x00096B58 File Offset: 0x00094D58
public string ProviderName
{
get
{
return this._params.ProviderName;
}
}
/// <summary>Gets the provider type of a key.</summary>
/// <returns>The provider type. The default is 1.</returns>
// Token: 0x17000943 RID: 2371
// (get) Token: 0x06002EE2 RID: 12002 RVA: 0x00096B68 File Offset: 0x00094D68
public int ProviderType
{
get
{
return this._params.ProviderType;
}
}
/// <summary>Gets a value indicating whether a key container was randomly generated by a managed cryptography class.</summary>
/// <returns>true if the key container was randomly generated; otherwise, false.</returns>
// Token: 0x17000944 RID: 2372
// (get) Token: 0x06002EE3 RID: 12003 RVA: 0x00096B78 File Offset: 0x00094D78
public bool RandomlyGenerated
{
get
{
return this._random;
}
}
/// <summary>Gets a value indicating whether a key can be removed from a key container.</summary>
/// <returns>true if the key is removable; otherwise, false.</returns>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider (CSP) was not found.</exception>
// Token: 0x17000945 RID: 2373
// (get) Token: 0x06002EE4 RID: 12004 RVA: 0x00096B80 File Offset: 0x00094D80
public bool Removable
{
get
{
return false;
}
}
/// <summary>Gets a unique key container name.</summary>
/// <returns>The unique key container name.</returns>
/// <exception cref="T:System.NotSupportedException">The key type is not supported.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider cannot be found.-or-The key container was not found.</exception>
// Token: 0x17000946 RID: 2374
// (get) Token: 0x06002EE5 RID: 12005 RVA: 0x00096B84 File Offset: 0x00094D84
public string UniqueKeyContainerName
{
get
{
return this._params.ProviderName + "\\" + this._params.KeyContainerName;
}
}
// Token: 0x04001314 RID: 4884
private CspParameters _params;
// Token: 0x04001315 RID: 4885
internal bool _random;
}
}