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
nullis returned. This method never throws any exceptions, but always returnednullon failure.
CreateSecurityMediumKeyFile(string, string)
Instantiates an IEbicsSecurityMedium implementation for a given class name.
public static IEbicsSecurityMedium CreateSecurityMediumKeyFile(string sAssemblyName, string sClassName)
Parameters
sAssemblyNamestringAssembly from which to load the class that implements IEbicsSecurityMedium. If this is null or empty, then the default EBICS assembly will be tried.
sClassNamestringThe class name of the desired implementation. If this is null or empty, then the default implementation will be instantiated, and
sAssemblyNameis ignored.
Returns
- IEbicsSecurityMedium
If the requested class is unknown, then
nullis returned.
CreateSecurityMediumSmartCard(string, string)
public static IEbicsSecurityMedium CreateSecurityMediumSmartCard(string sAssemblyName, string sClassName)
Parameters
sAssemblyNamestringAssembly 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.
sClassNamestringFull class name of the class that implements IEbicsSecurityMedium. If this is null or empty, then the default SECCOS implementation will be instantiated, and
sAssemblyNameis ignored.
Returns
- IEbicsSecurityMedium
If the requested class is unknown, then
nullis returned.
DetectSecurityMediumKeyFile(string)
Tries to detect the type of a key file.
public static string DetectSecurityMediumKeyFile(string sKeyFilePath)
Parameters
sKeyFilePathstring
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
nullis 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
aSecurityOperationsIEbicsSecurityOperations
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
aContactEbicsContactaSecurityMediumIEbicsSecurityMediumnKeyCodeEbicsSecurityCode
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.