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ériau clé dans un objet 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 de l’objet BLOB de clé.
Retours
Objet BLOB qui contient le matériau de clé au format spécifié.
- Attributs
Exceptions
format a la valeur null.
Toutes les autres erreurs. En règle générale, la ExportPolicy clé n’autorise pas l’exportation de la clé.
Remarques
Le chiffrement de nouvelle génération (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 Pkcs8PrivateBlob, EccPrivateBlob et OpaqueTransportBlob. Cette restriction est contrôlée par le KSP sous-jacent. Si vous utilisez un autre KSP, d’autres formats peuvent s’appliquer.