System.Reflection.StrongNameKeyPair Class

Assembly: Mscorlib.dll
Namespace: System.Reflection
Summary
Encapsulates access to a public or private key pair used to sign strong name assemblies.
C# Syntax:
[Serializable]
public class StrongNameKeyPair
See also:
System.Reflection Namespace | SecurityPermissionAttribute | SecurityPermissionFlag

System.Reflection.StrongNameKeyPair Member List:

Public Constructors
ctor #1 Overloaded:
.ctor(byte[] keyPairArray)

Initializes a new instance of the StrongNameKeyPair class, building the key pair from a byte array.
ctor #2 Overloaded:
.ctor(FileStream keyPairFile)

Initializes a new instance of the StrongNameKeyPair class, building the key pair from a FileStream.
ctor #3 Overloaded:
.ctor(string keyPairContainer)

Initializes a new instance of the StrongNameKeyPair class, building the key pair from a String.
Public Properties
PublicKey Read-only

Gets the public part of the originator of the key pair.
Public Methods
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString
(inherited from System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Reflection.StrongNameKeyPair Member Details

Overloaded ctor #1
Summary
Initializes a new instance of the StrongNameKeyPair class, building the key pair from a byte array.
C# Syntax:
public StrongNameKeyPair(
   byte[] keyPairArray
);
Parameters:

keyPairArray

An array of type byte containing the key pair.

Exceptions
Exception Type Condition
ArgumentNullException keyPairArray is null.
SecurityException The caller does not have the required permission.
.NET Framework Security:
SecurityPermission for access to unmanaged code. Associated enumeration: SecurityPermissionFlag.UnmanagedCode.
See also:
Array

Return to top


Overloaded ctor #2
Summary
Initializes a new instance of the StrongNameKeyPair class, building the key pair from a FileStream.
C# Syntax:
public StrongNameKeyPair(
   FileStream keyPairFile
);
Parameters:

keyPairFile

A FileStream containing the key pair.

Exceptions
Exception Type Condition
ArgumentNullException keyPairFile is null.
SecurityException The caller does not have the required permission.
.NET Framework Security:
SecurityPermission for access to unmanaged code. Associated enumeration: SecurityPermissionFlag.UnmanagedCode.
See also:
FileStream

Return to top


Overloaded ctor #3
Summary
Initializes a new instance of the StrongNameKeyPair class, building the key pair from a String.
C# Syntax:
public StrongNameKeyPair(
   string keyPairContainer
);
Parameters:

keyPairContainer

A string containing the key pair.

Exceptions
Exception Type Condition
ArgumentNullException keyPairContainer is null.
SecurityException The caller does not have the required permission.
Remarks
The key pair is in a named key container.
.NET Framework Security:
SecurityPermission for access to unmanaged code. Associated enumeration: SecurityPermissionFlag.UnmanagedCode.
See also:
Array

Return to top


Property: PublicKey (read-only)
Summary
Gets the public part of the originator of the key pair.
C# Syntax:
public byte[] PublicKey {get;}
See also:
Array | String

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~StrongNameKeyPair();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.