Class EbicsSecurityMedium
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
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 returnednull
on failure.
CreateSecurityMediumKeyFile(string, string)
Instantiates an IEbicsSecurityMedium implementation for a given class name.
public static IEbicsSecurityMedium CreateSecurityMediumKeyFile(string sAssemblyName, string sClassName)
Parameters
sAssemblyName
stringAssembly from which to load the class that implements IEbicsSecurityMedium. If this is null or empty, then the default EBICS assembly will be tried.
sClassName
stringThe 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
stringAssembly 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
stringFull 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
EbicsContactaSecurityMedium
IEbicsSecurityMediumnKeyCode
EbicsSecurityCode
Returns
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.