Create Method ()
Collapse the table of content
Expand the table of content

AsymmetricAlgorithm.Create Method ()

Creates a default cryptographic object used to perform the asymmetric algorithm.

Namespace: System.Security.Cryptography
Assembly: mscorlib (in mscorlib.dll)

public static AsymmetricAlgorithm Create ()
public static AsymmetricAlgorithm Create ()
public static function Create () : AsymmetricAlgorithm
Not applicable.

Return Value

The cryptographic object used to perform the asymmetric algorithm.

The following code example demonstrates how to implement the Create method in an extended class. This code example is part of a larger example provided for the AsymmetricAlgorithm class.

// The create function attempts to create a CustomCrypto object using
// the assembly name. This functionality requires modification of the
// machine.config file. Add the following section to the configuration
// element and modify the values of the cryptoClass to reflect what is
// installed in your machines GAC.
//<mscorlib>
//  <cryptographySettings>
//    <cryptoNameMapping>
//      <cryptoClasses>
//        <cryptoClass CustomCrypto="Contoso.CustomCrypto, 
//          CustomCrypto, 
//          Culture=neutral, 
//          PublicKeyToken=fdb9f9c4851028bf, 
//          Version=1.0.1448.27640" />
//      </cryptoClasses>
//      <nameEntry name="Contoso.CustomCrypto" class="CustomCrypto" />
//      <nameEntry name="CustomCrypto" class="CustomCrypto" />
//    </cryptoNameMapping>
//  </cryptographySettings>
//</mscorlib>
new static public CustomCrypto Create() 
{
    return Create("CustomCrypto");
}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2016 Microsoft