CngKey.Export(CngKeyBlobFormat) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Exporte le matériel clé dans un BLOB, au format spécifié.
public:
cli::array <System::Byte> ^ Export(System::Security::Cryptography::CngKeyBlobFormat ^ format);
public byte[] Export (System.Security.Cryptography.CngKeyBlobFormat format);
[System.Security.SecurityCritical]
public byte[] Export (System.Security.Cryptography.CngKeyBlobFormat format);
member this.Export : System.Security.Cryptography.CngKeyBlobFormat -> byte[]
[<System.Security.SecurityCritical>]
member this.Export : System.Security.Cryptography.CngKeyBlobFormat -> byte[]
Public Function Export (format As CngKeyBlobFormat) As Byte()
Paramètres
- format
- CngKeyBlobFormat
Objet qui spécifie le format du BLOB de clé.
Retours
- Byte[]
Un BLOB qui contient le matériel clé au format spécifié.
- Attributs
Exceptions
format
a la valeur null
.
Toutes les autres erreurs. En général, ExportPolicy n'autorise pas l'exportation de la clé.
Remarques
Le chiffrement Next Generation (CNG) autorise l’exportation dans n’importe quel format pris en charge par le fournisseur de stockage de clés sous-jacent (KSP). Par exemple, sur Windows Vista, le KSP par défaut (qui est MicrosoftSoftwareKeyStorageProvider) autorise uniquement l’exportation de clés privées dans les formats et EccPrivateBlobOpaqueTransportBlob les Pkcs8PrivateBlobformats. Cette restriction est contrôlée par le KSP sous-jacent. Si vous utilisez un autre KSP, d’autres formats peuvent s’appliquer.