KeyMaster.NET
KeyMaster Constructor (configuration)
KeyMaster.NETCaplin.KeyMasterKeyMasterKeyMaster(IKeyMasterConfiguration)
Initializes a new instance of the KeyMaster class.
Declaration Syntax
C#Visual BasicVisual C++
public KeyMaster(
	IKeyMasterConfiguration configuration
)
Public Sub New ( _
	configuration As IKeyMasterConfiguration _
)
public:
KeyMaster(
	IKeyMasterConfiguration^ configuration
)
Parameters
configuration (IKeyMasterConfiguration)
The configuration for this instance of KeyMaster.
Examples

This example constructs a KeyMaster instance using a private key contained within a PEM file.

CopyC#
using System;
using System.Collections.Generic;
using System.Text;
using Caplin.KeyMaster;
using Caplin.KeyMaster.Configuration;

namespace KeyMasterSnippets
{
    class CreatingKeyMasterInstance
    {
        const string PEM_FILE_LOCATION = "c:\\myprivatekey.pem";

        IKeyMaster CreateKeyMasterInstance()
        {
            // Create a KeyMaster configuration using a private key stored as a PEM format file.
            // This constructor may throw an exception; handling of it has been omitted for clarity.
            IKeyMasterConfiguration configuration = new PEMKeyMasterConfiguration(PEM_FILE_LOCATION);

            // Create a keymaster instance.
            IKeyMaster keymaster = new KeyMaster(configuration);

            return keymaster;
        }
    }
}

Assembly: Caplin.KeyMaster (Module: Caplin.KeyMaster) Version: 5.0.4.0 (5.0.4.0)