Class EbicsSecurityMediumFileSMB
Implements IEbicsSecurityMedium for StarMoney Business EBICS key files.
Inheritance
Inherited Members
Namespace: Subsembly.EBICS
Assembly: Subsembly.EBICS.Core.dll
Syntax
public class EbicsSecurityMediumFileSMB : IEbicsSecurityMedium, IEbicsSecurityMediumStoredContact, IEbicsSecurityMediumPrivKeys
Remarks
StarMoney Business EBICS key files usually have the name "security_ebics.key". The format is roughly equivalent to the PPI RDH-2 format for HBCI key files.
Fields
CLASSNAME
Declaration
public const string CLASSNAME = "Subsembly.EBICS.EbicsSecurityMediumFileSMB"
Field Value
Type | Description |
---|---|
System.String |
Properties
CanChangePIN
Indicates whether the password of the key file can be changed.
Declaration
public bool CanChangePIN { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Changing the password of a SMB key file is not supported. Therefore this property
is always false
.
LastError
Declaration
public EbicsSecurityMediumErrorCode LastError { get; }
Property Value
Type | Description |
---|---|
EbicsSecurityMediumErrorCode |
SecurityMedium
Always returns "0100".
Declaration
public string SecurityMedium { get; }
Property Value
Type | Description |
---|---|
System.String |
SecurityMediumID
Declaration
public string SecurityMediumID { get; }
Property Value
Type | Description |
---|---|
System.String |
SecurityMediumType
Declaration
public EbicsSecurityMediumType SecurityMediumType { get; }
Property Value
Type | Description |
---|---|
EbicsSecurityMediumType |
State
Declaration
public EbicsSecurityMediumState State { get; }
Property Value
Type | Description |
---|---|
EbicsSecurityMediumState |
StoredContact
Declaration
public EbicsContact StoredContact { get; set; }
Property Value
Type | Description |
---|---|
EbicsContact |
SupportedSecurityCodes
Provides the set of EBICS security operations that are supported by this security media implementation.
Declaration
public EbicsSecurityCode SupportedSecurityCodes { get; }
Property Value
Type | Description |
---|---|
EbicsSecurityCode |
Remarks
The EbicsSecurityMediumFileSMB implementation currently only supports the classic EBICS security operations A004, E001 and X001.
Methods
Authenticate(String)
Declaration
public bool Authenticate(string sPIN)
Parameters
Type | Name | Description |
---|---|---|
System.String | sPIN |
Returns
Type | Description |
---|---|
System.Boolean |
ChangePIN(String, String)
Change the password used to protect the key file.
Declaration
public bool ChangePIN(string sOldPIN, string sNewPIN)
Parameters
Type | Name | Description |
---|---|---|
System.String | sOldPIN | The old password to be changed. Must not be |
System.String | sNewPIN | The new password to be assigned. Must not be |
Returns
Type | Description |
---|---|
System.Boolean | If the password was changed successfully, then |
Remarks
This security medium must be in the Selected, State when this method is called. It will return back into the Null State, regardless of success or failure.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter sOldPIN or sNewPIN was |
System.InvalidOperationException | This security medium instance is not in the Selected state. |
Create(String, String)
Creates a new key file.
Declaration
public bool Create(string sSecurityMediaID, string sPIN)
Parameters
Type | Name | Description |
---|---|---|
System.String | sSecurityMediaID | The path to the key file to be created. This must not be |
System.String | sPIN | The PIN to be assigned to the new file to be created. |
Returns
Type | Description |
---|---|
System.Boolean | If the security token was successfully created, then |
Remarks
This method may only be called when this security medium is in the Null State. If the security token was successfully created, then it will be in the Authenticated State. thereafter.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter sSecurityMediaID or sPIN was |
System.ArgumentException | The parameter sSecurityMediaID was an empty string. |
System.InvalidOperationException | There is already a selected file. |
GetPasswordInfo()
Declaration
public EbicsPasswordInfo GetPasswordInfo()
Returns
Type | Description |
---|---|
EbicsPasswordInfo |
GetSecurityOperations(EbicsContact)
Declaration
public IEbicsSecurityOperations GetSecurityOperations(EbicsContact aContact)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact |
Returns
Type | Description |
---|---|
IEbicsSecurityOperations |
Release()
Declaration
public void Release()
Select(String)
Select existing key file.
Declaration
public bool Select(string sSecurityMediaID)
Parameters
Type | Name | Description |
---|---|---|
System.String | sSecurityMediaID | The path to the existing key file to select. This must not be |
Returns
Type | Description |
---|---|
System.Boolean |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter sSecurityMediaID was |
System.ArgumentException | The parameter sSecurityMediaID was an empty string. |
System.InvalidOperationException | There is already a selected file. |
Explicit Interface Implementations
IEbicsSecurityMediumPrivKeys.DeletePrivKey(EbicsContact, EbicsSecurityCode)
Declaration
void IEbicsSecurityMediumPrivKeys.DeletePrivKey(EbicsContact aContact, EbicsSecurityCode nCode)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact | |
EbicsSecurityCode | nCode |
IEbicsSecurityMediumPrivKeys.GetPrivKey(EbicsContact, EbicsSecurityCode)
Declaration
EbicsPrivKey IEbicsSecurityMediumPrivKeys.GetPrivKey(EbicsContact aContact, EbicsSecurityCode nCode)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact | |
EbicsSecurityCode | nCode |
Returns
Type | Description |
---|---|
EbicsPrivKey |
IEbicsSecurityMediumPrivKeys.StorePrivKey(EbicsContact, EbicsPrivKey)
Declaration
void IEbicsSecurityMediumPrivKeys.StorePrivKey(EbicsContact aContact, EbicsPrivKey aPrivKey)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact | |
EbicsPrivKey | aPrivKey |