AsymmetricKeyAlgorithmProvider.CreateKeyPairWithCurveName(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a public/private key pair using an algorithmic curve name.
public:
virtual CryptographicKey ^ CreateKeyPairWithCurveName(Platform::String ^ curveName) = CreateKeyPairWithCurveName;
CryptographicKey CreateKeyPairWithCurveName(winrt::hstring const& curveName);
public CryptographicKey CreateKeyPairWithCurveName(string curveName);
function createKeyPairWithCurveName(curveName)
Public Function CreateKeyPairWithCurveName (curveName As String) As CryptographicKey
Parameters
- curveName
-
String
Platform::String
winrt::hstring
The name of the curve.
Returns
Represents the generated Elliptic Curve Digital Signature Algorithm (ECDSA) asymmetric key pair.
Examples
The following example creates a new ECDSA curve from CurveName.
AsymmetricKeyAlgorithmProvider eccAlgorithmProvider =
AsymmetricKeyAlgorithmProvider.OpenAlgorithm(AsymmetricAlgorithmNames.EcdsaSha256);
CryptographicKey keyPair = eccAlgorithmProvider.CreateKeyPairWithCurveName(EccCurveNames.Secp160k1);
AsymmetricKeyAlgorithmProvider^ eccAlgorithmProvider = AsymmetricKeyAlgorithmProvider::OpenAlgorithm(
AsymmetricAlgorithmNames::EcdsaSha256);
CryptographicKey^ keyPair = eccAlgorithmProvider->CreateKeyPairWithCurveName(EccCurveNames::Secp160k1);
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for