4 instantiations of CngKey
System.Core (4)
System\Security\Cryptography\CngKey.cs (4)
449
CngKey key = new
CngKey
(kspHandle, keyHandle);
607
CngKey key = new
CngKey
(kspHandle, keyHandle);
716
return new
CngKey
(kspHandle, keyHandle);
749
key = new
CngKey
(kspHandle, keyHandleCopy);
80 references to CngKey
System.Core (78)
System\Security\Cryptography\CngKey.cs (24)
398
public static
CngKey
Create(CngAlgorithm algorithm) {
399
Contract.Ensures(Contract.Result<
CngKey
>() != null);
403
public static
CngKey
Create(CngAlgorithm algorithm, string keyName) {
404
Contract.Ensures(Contract.Result<
CngKey
>() != null);
409
public static
CngKey
Create(CngAlgorithm algorithm, string keyName, CngKeyCreationParameters creationParameters) {
410
Contract.Ensures(Contract.Result<
CngKey
>() != null);
449
CngKey
key = new CngKey(kspHandle, keyHandle);
551
public static
CngKey
Import(byte[] keyBlob, CngKeyBlobFormat format) {
552
Contract.Ensures(Contract.Result<
CngKey
>() != null);
556
internal static
CngKey
Import(byte[] keyBlob, string curveName, CngKeyBlobFormat format) {
557
Contract.Ensures(Contract.Result<
CngKey
>() != null);
561
public static
CngKey
Import(byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) {
562
Contract.Ensures(Contract.Result<
CngKey
>() != null);
567
internal static
CngKey
Import(byte[] keyBlob, string curveName, CngKeyBlobFormat format, CngProvider provider)
569
Contract.Ensures(Contract.Result<
CngKey
>() != null);
607
CngKey
key = new CngKey(kspHandle, keyHandle);
678
public static
CngKey
Open(string keyName) {
679
Contract.Ensures(Contract.Result<
CngKey
>() != null);
683
public static
CngKey
Open(string keyName, CngProvider provider) {
684
Contract.Ensures(Contract.Result<
CngKey
>() != null);
689
public static
CngKey
Open(string keyName, CngProvider provider, CngKeyOpenOptions openOptions) {
690
Contract.Ensures(Contract.Result<
CngKey
>() != null);
724
public static
CngKey
Open(SafeNCryptKeyHandle keyHandle, CngKeyHandleOpenOptions keyHandleOpenOptions) {
746
CngKey
key = null;
System\Security\Cryptography\ECDiffieHellmanCng.cs (14)
37
private
CngKey
m_key;
69
public ECDiffieHellmanCng(
CngKey
key) {
97
Key =
CngKey
.Open(importHandle, key.IsEphemeral ? CngKeyHandleOpenOptions.EphemeralKey : CngKeyHandleOpenOptions.None);
209
public
CngKey
Key {
211
Contract.Ensures(Contract.Result<
CngKey
>() != null);
212
Contract.Ensures(Contract.Result<
CngKey
>().AlgorithmGroup == CngAlgorithmGroup.ECDiffieHellman);
248
m_key =
CngKey
.Create(algorithm, null, creationParameters);
328
using (
CngKey
import = otherKey.Import()) {
337
public byte[] DeriveKeyMaterial(
CngKey
otherPartyPublicKey) {
503
using (
CngKey
importedKey = otherKey.Import()) {
513
public SafeNCryptSecretHandle DeriveSecretAgreementHandle(
CngKey
otherPartyPublicKey) {
555
CngKey
newKey =
CngKey
.Create(curve, name =>
CngKey
.EcdhCurveNameToAlgorithm(name));
System\Security\Cryptography\ECDiffieHellmanCngPublicKey.cs (8)
69
using (
CngKey
imported =
CngKey
.Import(publicKeyBlob, format)) {
78
internal static ECDiffieHellmanCngPublicKey FromKey(
CngKey
key) {
117
public
CngKey
Import() {
118
Contract.Ensures(Contract.Result<
CngKey
>() != null);
121
return
CngKey
.Import(ToByteArray(), m_curveName, BlobFormat);
148
using (
CngKey
key = Import()) {
163
using (
CngKey
key = Import()) {
System\Security\Cryptography\ECDsaCng.cs (10)
23
private
CngKey
m_key;
51
public ECDsaCng(
CngKey
key) {
78
Key =
CngKey
.Open(keyHandle, key.IsEphemeral ? CngKeyHandleOpenOptions.EphemeralKey : CngKeyHandleOpenOptions.None);
122
public
CngKey
Key {
124
Contract.Ensures(Contract.Result<
CngKey
>() != null);
125
Contract.Ensures(IsEccAlgorithmGroup(Contract.Result<
CngKey
>().AlgorithmGroup));
161
m_key =
CngKey
.Create(algorithm, null, creationParameters);
433
CngKey
newKey =
CngKey
.Create(curve, name =>
CngKey
.EcdsaCurveNameToAlgorithm(name));
System\Security\Cryptography\Rfc4050KeyFormatter.cs (1)
65
Contract.Ensures(Contract.Result<
CngKey
>() != null);
System\Security\Cryptography\RsaCng.cs (9)
22
private
CngKey
_key;
44
/// <see cref="
CngKey
.AlgorithmGroup" /> must be Rsa.
53
public RSACng(
CngKey
key)
64
Key =
CngKey
.Open(key.Handle, key.IsEphemeral ? CngKeyHandleOpenOptions.EphemeralKey : CngKeyHandleOpenOptions.None);
78
public
CngKey
Key
103
_key =
CngKey
.Create(CngAlgorithm.Rsa, null, creationParameters);
391
CngKey
newKey =
CngKey
.Import(rsaBlob, publicOnly ? s_rsaPublicBlob : s_rsaPrivateBlob);
479
CngKey
key = Key;
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (8)
33
CngKey
key =
CngKey
.Open(privateKeyHandle, openOptions);
88
using (
CngKey
key =
CngKey
.Import(keyBlob, blobFormat))
125
CngKey
key;
347
private static
CngKey
LegacyBCryptHandleToNCryptHandle(SafeBCryptKeyHandle bcryptKeyHandle)
351
CngKey
Key =
CngKey
.Import(keyBlob, CngKeyBlobFormat.EccPublicBlob);
System\Security\Cryptography\X509Certificates\RSACertificateExtensions.cs (4)
51
CngKey
key =
CngKey
.Import(cngBlob, CngKeyBlobFormat.GenericPublicBlob);
88
CngKey
key =
CngKey
.Open(privateKeyHandle, openOptions);
System.Data (2)
fx\src\data\System\Data\SqlClient\SqlColumnEncryptionCngProvider.cs (2)
394
CngKey
cngKey;
398
cngKey =
CngKey
.Open(keyIdentifier, cngProvider);