Class StrongNameKeyPairGenerator
Utility class that can be used to generate a strong name key pair (.snk) usable for signing an assembly.
Inherited Members
Namespace: Alphaleonis.Reflection.Metadata
Assembly: Alphaleonis.Reflection.Metadata.dll
Syntax
public static class StrongNameKeyPairGenerator
Methods
| Improve this Doc View SourceCreateStrongNameKeyFile(String, Int32)
Creates strong name key pair.
Declaration
public static void CreateStrongNameKeyFile(string filePath, int keySize = 1024)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | Full path to the file to write the strong name key pair to. |
Int32 | keySize | (Optional) The key size. Must be between 384 and 16384 and be a multiple of 8. The default is 1024. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown when one or more arguments have unsupported or illegal values. |
CreateStrongNameKeyPair(Int32)
Creates strong name key pair.
Declaration
public static byte[] CreateStrongNameKeyPair(int keySize = 1024)
Parameters
Type | Name | Description |
---|---|---|
Int32 | keySize | The key size. Must be between 384 and 16384 and be a multiple of 8. The default is 1024. |
Returns
Type | Description |
---|---|
Byte[] | A new array containing the strong name key pair. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown when one or more arguments have unsupported or illegal values. |