Class EbicsSecurityMedium

Namespace
Subsembly.EBICS
Assembly
Subsembly.EBICS.Core.dll

Helper methods for dealing with IEbicsSecurityMedium instances.

public static class EbicsSecurityMedium
Inheritance
EbicsSecurityMedium
Inherited Members

Methods

CreateSecurityMedium(string, string)

Instantiates an IEbicsSecurityMedium implementation for a given assembly and class name.

public static IEbicsSecurityMedium CreateSecurityMedium(string sAssemblyName, string sClassName)

Parameters

sAssemblyName string
sClassName string

Returns

IEbicsSecurityMedium

If the named implementation could be created, then it is returned. If the class cannot be created, then null is returned. This method never throws any exceptions, but always returned null on failure.

CreateSecurityMediumKeyFile(string, string)

Instantiates an IEbicsSecurityMedium implementation for a given class name.

public static IEbicsSecurityMedium CreateSecurityMediumKeyFile(string sAssemblyName, string sClassName)

Parameters

sAssemblyName string

Assembly from which to load the class that implements IEbicsSecurityMedium. If this is null or empty, then the default EBICS assembly will be tried.

sClassName string

The class name of the desired implementation. If this is null or empty, then the default implementation will be instantiated, and sAssemblyName is ignored.

Returns

IEbicsSecurityMedium

If the requested class is unknown, then null is returned.

CreateSecurityMediumSmartCard(string, string)

public static IEbicsSecurityMedium CreateSecurityMediumSmartCard(string sAssemblyName, string sClassName)

Parameters

sAssemblyName string

Assembly from which to load the class that implements IEbicsSecurityMedium. If this is null or empty, then the default assembly "Subsembly.EBICS.SmartCard" will be tried.

sClassName string

Full class name of the class that implements IEbicsSecurityMedium. If this is null or empty, then the default SECCOS implementation will be instantiated, and sAssemblyName is ignored.

Returns

IEbicsSecurityMedium

If the requested class is unknown, then null is returned.

DetectSecurityMediumKeyFile(string)

Tries to detect the type of a key file.

public static string DetectSecurityMediumKeyFile(string sKeyFilePath)

Parameters

sKeyFilePath string

Returns

string

If the type of the key file could be detected, then the class name of the matching IEbicsSecurityMedium implementation will be returned. If the file format is unknown, then null is returned.

Exceptions

ArgumentNullException

The parameter sKeyFilePath was null.

ArgumentException

The parameter sKeyFilePath was not a valid path specification.

GetAvailableKeys(IEbicsSecurityOperations)

public static EbicsSecurityCode GetAvailableKeys(IEbicsSecurityOperations aSecurityOperations)

Parameters

aSecurityOperations IEbicsSecurityOperations

Returns

EbicsSecurityCode

Returns a bit mask of the keys that are available in the given security medium.

ProduceKey(EbicsContact, IEbicsSecurityMedium, EbicsSecurityCode)

Produce a required key from a security medium. If the key does not exist, then an attempt is made to create it. This shall only be used for key initialization!

public static EbicsPubKeyInfo ProduceKey(EbicsContact aContact, IEbicsSecurityMedium aSecurityMedium, EbicsSecurityCode nKeyCode)

Parameters

aContact EbicsContact
aSecurityMedium IEbicsSecurityMedium
nKeyCode EbicsSecurityCode

Returns

EbicsPubKeyInfo

Remarks

In order to submit a key with EBICS 3.0 it must have a certificate. Thus, if the security media does not come with a certificate, then we add a self-signed-certificate to the returned public key on-the-fly.