Επεξεργασία

Κοινή χρήση μέσω


StrongName Class

Definition

Caution

Code Access Security is not supported or honored by the runtime.

Provides the strong name of a code assembly as evidence for policy evaluation. This class cannot be inherited.

public ref class StrongName sealed : System::Security::Policy::EvidenceBase, System::Security::Policy::IIdentityPermissionFactory
public ref class StrongName sealed : System::Security::Policy::IIdentityPermissionFactory
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class StrongName : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
public sealed class StrongName : System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class StrongName : System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class StrongName : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
public sealed class StrongName : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type StrongName = class
    inherit EvidenceBase
    interface IIdentityPermissionFactory
[<System.Serializable>]
type StrongName = class
    interface IIdentityPermissionFactory
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type StrongName = class
    interface IIdentityPermissionFactory
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type StrongName = class
    inherit EvidenceBase
    interface IIdentityPermissionFactory
type StrongName = class
    inherit EvidenceBase
    interface IIdentityPermissionFactory
Public NotInheritable Class StrongName
Inherits EvidenceBase
Implements IIdentityPermissionFactory
Public NotInheritable Class StrongName
Implements IIdentityPermissionFactory
Inheritance
StrongName
Inheritance
StrongName
Attributes
Implements

Remarks

Caution

Code Access Security (CAS) has been deprecated across all versions of .NET Framework and .NET. Recent versions of .NET do not honor CAS annotations and produce errors if CAS-related APIs are used. Developers should seek alternative means of accomplishing security tasks.

The StrongName class represents evidence of a unique, cryptographically strong name of a code assembly. The strong name consists of a public key, a given name, and a version. The public key corresponds to the publisher's private key which is kept secret, and with which the assembly must be signed in order for the strong name to be valid.

Strong names are typically assigned to assemblies using either AssemblyKeyFileAttribute, AssemblyKeyNameAttribute or AssemblyDelaySignAttribute in conjunction with the SN utility (see Sn.exe (Strong Name Tool)).

StrongNameIdentityPermission uses this class to confirm that calling code is in a particular strong-named code assembly.

Constructors

StrongName(StrongNamePublicKeyBlob, String, Version)

Initializes a new instance of the StrongName class with the strong name public key blob, name, and version.

Properties

Name

Gets the simple name of the current StrongName.

PublicKey

Gets the StrongNamePublicKeyBlob of the current StrongName.

Version

Gets the Version of the current StrongName.

Methods

Clone()

Creates a new object that is a copy of the current instance.

Clone()

Creates a new object that is a complete copy of the current instance.

(Inherited from EvidenceBase)
Copy()

Creates an equivalent copy of the current StrongName.

CreateIdentityPermission(Evidence)

Creates a StrongNameIdentityPermission that corresponds to the current StrongName.

Equals(Object)

Determines whether the specified strong name is equal to the current strong name.

GetHashCode()

Gets the hash code of the current StrongName.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Creates a string representation of the current StrongName.

Applies to