Framework EDI Reference. Methods and Properties
ediSecurities. CreateKeyContainer

Creates a new Cryptographic Service Provider (CSP) Key Container and generates the public/private key pair.

Syntax:

<lRetVal> = Object.CreateKeyContainer(<sKeyContainerName>, [<sServiceProvider>], [<lProviderType>])

Parameters:

Returns:

Returns 1 if the task was successful.  Otherwise it returns 0.

Remarks:

When a new key container is added, the public/private key pairs for both the Key Exchange and the Signature keys are created.

Example:

Set oSecurities = oEdiDoc.GetSecurities

' Creates a new key container for hypothetical trading partner.
oSecurities.DeleteKeyContainer sKeyContainerName
oSecurities.CreateKeyContainer sKeyContainerName

'Export private and public key container to a file
oSecurities.ExportExchangeKeyPair sExportFileName, sPassword, sKeyContainerName, sProviderName